[Feature Request] Add Unix timestamp to date/time formatting

It would be nice if I could format date+time as a unix timestamp.

Hallo

=(your_date - DATE(1970;1;1)) * 84600
1 Like

It may be better to post your request at another place, as the “instructions” for this site claim:

Feature requests should go directly to Bugzilla as Enhancements
Log in to Bugzilla

1 Like

86400
…
But bear in mind that Unix seconds since Epoch is UTC while date+time in Calc is local time, so you’d have to subtract your local time zone offset (in seconds).

I suppose that date+time in Calc is TZ-agnostic, rather than local time? Which means that the offset application should be considered specially in each case?

Yes. Local time in the sense whatever timezone your system is in, NOW() delivers the local time.

BTW a question for the professionals.
Some time ago I wrote my own NowUTC() function based on the LibreOffice API. I’m aware of course that my results may not be reliable to the µs. The access to the API is through Basic, and there is a bit of formatting. In addition I don’t know in what way and to what expectable precision my hardware, the LibO API and Win 10 avoid synchronization errors concerning the NTP servers. Anyway I would expect only milliseconds of delay/difference.
Reading this thread I now made a unix timestamp for spreadsheet cells based on the mentioned Calc-UDF and compared my display to what is shown by https://www.unixtimestamp.com/ .
My timestamps always were 1 s through 15 s ahead. And the differences slowly increased. A refresh of the mentioned site then reduced the difference to about 1 s again.
How to understand this?
Does my browser feel charged with time tracking or synchronization - and then just can’t do it right? How to avoid being trapped by such misbehaviour?