1. Miguel Leeuwe
  2. PowerBuilder
  3. Monday, 5 July 2021 15:21 PM UTC

Hi,

Does anyone know where the Today() function gets it's value from? What I mean is: where does it look to determine the TimeZone your PC is configured for?

I've temporarily changed my Windows' TZ to Australia, but I'm still getting my local UK date when using Today().

TIA

 

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 5 July 2021 17:08 PM UTC
  2. PowerBuilder
  3. # Permalink

LOL.

Nothing to do with TZones.... There was a line of code assigning a today() + now() value on the same line as the declaration of a datetime variable. This will be initialized with the date of compilation and never ever receive an updated version, even if you run the application 10 years after compilation.

Yes ,.. I know. According to Appeon this is a "feature" brrrr.

regards.

Comment
  1. Armeen Mazda @Appeon
  2. Monday, 5 July 2021 17:45 PM UTC
Thanks for sharing the solution!
  1. Helpful
  1. Benjamin Gaesslein
  2. Tuesday, 6 July 2021 07:49 AM UTC
Well, it *can* be useful if you want to display the compilation time of your app somewhere. Of course you'd have to know about it first. ;)
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 6 July 2021 08:00 AM UTC
Yes, that's true and very handy. When applying it though, my development director "didn't like it", so I still have to bl***y edit all the versions manually every time. (Sigh)

regards
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.