UNIX Epoch time

67 views
Skip to first unread message

rjuli...@gmail.com

unread,
May 27, 2024, 3:53:11 PMMay 27
to VAST Community Forum
Hello.....

I am building an interface to an online service,
and they send back JSON, with dates/times encoded
in UNIX epoch time.

I know that means the number of seconds since
Jan. 1, 1970.

Is there a simple way that already exists to do the conversion?
I know it's not difficult....just want to use something in place
and supported, if possible.

THANKS!

mar...@feldtmann.online

unread,
May 27, 2024, 4:18:01 PMMay 27
to VAST Community Forum
You might search "unix epoch" for a thread somewhere 2023

mar...@feldtmann.online

unread,
May 27, 2024, 4:20:30 PMMay 27
to VAST Community Forum
And another thread 2022

Esteban A. Maringolo

unread,
May 28, 2024, 2:17:37 PMMay 28
to va-sma...@googlegroups.com
Hello Julian,

There is no out of the box support to instantiate and convert DateAndTime instances from/to UNIX Time integer representation.

So besides the suggestions pointed by Marten (in older forum discussions), you might consider using the attached fileouts to achieve what you want.

I hope you find them useful.

Best regards,

ps: As a side note, if you need to deal with UNIX Time coming from elsewhere, then there isn't much you can do, but if you're defining the API, going with an ISO 8601 string representation is way more reliable, as UNIX time doesn't consider leap seconds, daylight saving times and other adjustments that probably did happen, and will happen, after Jan 1st 1970.

Esteban Maringolo

Senior Software Developer

 emari...@instantiations.com
 @emaringolo
 /emaringolo
 instantiations.com
TwitterLinkedInVAST Community ForumGitHubYouTubepub.dev


--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to va-smalltalk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/b789f9ab-fa81-4e88-841d-d1b43c314472n%40googlegroups.com.
asUnixTime.st
fromUnixTime.st

Esteban A. Maringolo

unread,
May 30, 2024, 9:38:13 AMMay 30
to va-sma...@googlegroups.com
Hi Julian, all,

We decided to add these methods as part of the Kernel/CLDT apps for the next release of VAST.


Best regards,

Esteban Maringolo

Senior Software Developer

 emari...@instantiations.com
 @emaringolo
 /emaringolo
 instantiations.com
TwitterLinkedInVAST Community ForumGitHubYouTubepub.dev

Reply all
Reply to author
Forward
0 new messages