Getting Current UTC
#14
(01.09.2025, 11:02 AM)Dale Yarker Wrote: Additional thought on timestamps:

On one hand Windows has Filetime, and we work in Windows.

On the other hand 'ux time is used/supported as "standard".

On the gripping hand, maybe it is the 'ux that should upgrade to be compatable:

"What happens on January 19, 2038?
On this date the Unix Time Stamp will cease to work due to a 32-bit overflow. Before this moment millions of applications will need to either adopt a new convention for time stamps or be migrated to 64-bit systems which will buy the time stamp a "bit" more time."

"Systemtime range and practical limit of filetime 1 January 1601 to 14 September 30828, 02:48:05.4775807"

Filetime will last 15 times more years remaining, epoch earlier, and 10^7 times better resolution.

Another Motie, eh?

Unix Timestamp will only "cease to work" i.e. overflow if it is calculated/represented as a LONG. Use a DWORD instead and you get another 68 years. 

The UnixTimeNowStr above has the same maximum  14 September 30828 upper limit as FileTime

Many systems are already using an Int64 and I doubt the there will be many systems still using an int32 in 12 years time. 
Use a Quad and you get over 282 billion years Smile
That should be enough for Eric's "cosmologist working on the age of the universe,"
--
New PowerBASIC User Community Forum:
https://pbusers.org/forum
Reply


Messages In This Thread
Getting Current UTC - by Owen_English - 30.05.2025, 07:22 AM
RE: Getting Current UTC - by Kurt Kuzba - 30.05.2025, 12:32 PM
RE: Getting Current UTC - by Owen_English - 30.05.2025, 12:45 PM
RE: Getting Current UTC - by Stuart McLachlan - 31.08.2025, 04:06 AM
RE: Getting Current UTC - by Albert Richheimer - 30.05.2025, 12:54 PM
RE: Getting Current UTC - by Owen_English - 30.05.2025, 12:58 PM
RE: Getting Current UTC - by Dale Yarker - 30.05.2025, 01:09 PM
RE: Getting Current UTC - by George Bleck - 30.05.2025, 11:29 PM
RE: Getting Current UTC - by Eric Pearson - 31.08.2025, 09:19 AM
RE: Getting Current UTC - by Stuart McLachlan - 31.08.2025, 10:04 AM
RE: Getting Current UTC - by Stuart McLachlan - 01.09.2025, 07:06 AM
RE: Getting Current UTC - by Dale Yarker - 01.09.2025, 09:06 AM
RE: Getting Current UTC - by Dale Yarker - 01.09.2025, 11:02 AM
RE: Getting Current UTC - by Stuart McLachlan - 01.09.2025, 11:37 AM
RE: Getting Current UTC - by Stuart McLachlan - 03.09.2025, 07:05 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)