Jan 22, 2022 Replies: 2 The Y2038 problem is getting closer and closer, which is something we can't ignore. So far Linux/Unix haven't solved the problem yet. Code: Copy SELECT unix_timestamp("2042-01-22 18:25:30"); I'm amazed and surprised to discover that B4A is Y2038 proof already! Below is the code I tried. B4X: Copy Dim y2042 As Long=DateTime.Now+DateTime.TicksPerDay * 365 * 20 'add 20 years to current time Log(y2042) DateTime.DateFormat="EEEE yyyy-MM-dd hh:mm:ss" Log(DateTime.Date(y2042)) Code: Copy 2273603328237 Friday 2042-01-17 03:28:48 Long live the B4X! Click to expand...
The Y2038 problem is getting closer and closer, which is something we can't ignore. So far Linux/Unix haven't solved the problem yet. Code: Copy SELECT unix_timestamp("2042-01-22 18:25:30"); I'm amazed and surprised to discover that B4A is Y2038 proof already! Below is the code I tried. B4X: Copy Dim y2042 As Long=DateTime.Now+DateTime.TicksPerDay * 365 * 20 'add 20 years to current time Log(y2042) DateTime.DateFormat="EEEE yyyy-MM-dd hh:mm:ss" Log(DateTime.Date(y2042)) Code: Copy 2273603328237 Friday 2042-01-17 03:28:48 Long live the B4X!
toby Well-Known Member Licensed User Longtime User Jan 22, 2022 #2 I'm using 64-bit Windows 10, which might be a factor.
William Lancee Well-Known Member Licensed User Longtime User Jan 22, 2022 #3 B4X uses 64 bit Long integers for datetime. It doesn't matter what computer/device/OS you run it on.