Author Topic: DST token/UTC time  (Read 5370 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
DST token/UTC time
« on: May 15, 2016, 01:46:52 PM »
Currently, there is no built-in method of checking whether the current time is DST or not, which is necessary for determining UTC.

With the "{DST}" Token, one could calculate UTC using the existing tokens:
Code: [Select]
{EXP:{TIMEHOUR} - ({DST} + 5)} {TIMEMINUTE}
The alternative to this one new Token would be 4 new Tokens: "{timeUTC}", "{TIMEUTC}", "{HOURUTC}", and "{HOURUTC24}".
« Last Edit: June 07, 2016, 02:23:55 PM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: DST token/UTC time
« Reply #1 on: May 15, 2016, 10:15:59 PM »
On the todo list.  I think instead of all the tokens, I might just add an option to the Set DateTime screen (after 'current date/time').
« Last Edit: May 15, 2016, 10:19:25 PM by gmagenheimer »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: DST token/UTC time
« Reply #2 on: June 07, 2016, 02:14:16 PM »
This has been added as an option on the set date screen (last beta).  Hope you guys have found it ;)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: DST token/UTC time
« Reply #3 on: June 07, 2016, 02:33:01 PM »
Thanks Gary, this should work nicely.


As an example, because it's not yet in the documentation from what I can see:

Code: [Select]
Set date [TIMEUTC] value to the current date/time (UTC)
Say, 'Current UTC time is {time:TIMEUTC}'

Any of the time related tokens take a "Date/Time" variable as an argument in this way(E.G. {DATEMONTHNUMERIC:DateVariable}).