PDA

View Full Version : Daylight saving time in Date Created attribute?


kb5cth
01-25-2017, 01:41 PM
Kinook,

I use the "Date Created" attribute in the title of some items. I just noticed that on many of those items, the Date Created is 1 hour behind where it was when I made the item. I can verify this because the title shows one date & time and the attribute shows another. These items were made before the most recent time change.

With this behavior, half of all of my entries (I write a daily journal) at any given time will be 1 hour wrong.

Is there a way to change this behavior and make the Date Created attribute never change?


Bill

kinook
01-25-2017, 02:58 PM
UR converts UTC times to local time using the Bias returned by the GetTimeZoneInformation (https://msdn.microsoft.com/en-us/library/windows/desktop/ms724421(v=vs.85).aspx) Windows API. I guess you could tweak the TZ registry information (https://msdn.microsoft.com/en-us/library/windows/desktop/ms725481(v=vs.85).aspx) or update via SetTimeZoneInformation (https://msdn.microsoft.com/en-us/library/windows/desktop/ms724944(v=vs.85).aspx) if you don't want Windows to adjust for DST. You can also disable DST adjustment via the registry -- see http://www.thewindowsclub.com/daylight-saving-time-windows.

kb5cth
01-25-2017, 03:50 PM
I would expect that the Creation Date Attribute data would be stored information in the database. Wouldn't it then be a simple piece of data that is being displayed? Regardless of the setting of DST when the data was entered, isn't that data simply a string or other static piece of information that experiences no further manipulation when later being displayed, much like any string that has been stored?

Or is that info recreated (and thus adjusted for a new local setting) every time the program runs or that data is displayed?


Sadly, I run portable. No registry changes allowed on some of the machines I run. Hence apparently, no solution.

kinook
01-25-2017, 04:20 PM
Timestamps are stored in UTC and converted to local time when displayed in UR.

https://en.wikipedia.org/wiki/Coordinated_Universal_Time

kb5cth
01-26-2017, 06:43 AM
Sorry, I misunderstood.

I suppose I can at least move all times more than an hour away from midnight so the date stays constant.

Thanks for the quick reply.