Get current time?

Im starting a project where i wish to display a message to lcd display / http get with time
i couldnt find it on API. how do i get local time? (or gmt + 2 for example) ?

Also, is it possible to read strings from inputport?
Can i send to it on,eran,30 and i will interpret it as “on”, “eran”, 30 (number)
or having a node in planner receiving a string (like ticktock, but string) and sends it to the imp input port?

date() will return a table with the current time in it (UTC). If you wanted to get PST, for example, you could use this:

local d = date(time()-(86060));

…then d.hour is the hour, etc. See http://www.squirrel-lang.org/doc/sqstdlib3.html (search for date()).

And yes, inputports can be strings. You will have to parse the stuff yourself unless you json encode it though.