What’s the best way to get current date/time and use it within code?
I want to output 0 or 1 on pin1 based on what time it is.

would server.sleepuntil(hr,min) work for you?

The squirrel system library calls should work for you. See here:

…however, the concept of time is, right now, anchored to the server time. The longer term plan is for the imps to “reside” in the user account’s timezone. This is more complex when a user has imps split across timezones on a single account, but works for most people.

Would that work for you?

Works fine for now while testing. I can offset time with -25200 to compensate for GMT-7
time is actually GMT time and not server time, unless the server is on GMT time.

I suspect the server is on GMT, which would explain it…

One BIG use I see for the imp is for implementing “internet clocks”.
You know, the kind you just plug it in, and presto… exact localtime is displayed
now and forever (until power is removed).

This requires time-of-day from somewhere, and perhaps ip-geo-location to set the TZ.

Or a GPS module…?