Timestamp "but locally"


It is now available v16 r2 a new command Timestamp . GREAT

This is a good thing form international purposes, but it would be good to for local purposes having a second paramter or * for having the Timestamp “but locally”, having in account summer time , …


Timestamp delivers text, so you have to parse anyway.
Suppose I’d like a 64-bit longint better.

Hi Ortwin,

Not, if I use as it is :wink:

Now, I can format it as I needed. But it’s quickest if there is a command.

: Alfonso ZAFON

for having the Timestamp “but locally”, having in account summer time

I know that non local time stamps looks strange. In Germany -1 or -2 hours.
Especially strange that log entries made at 01:00 have the date from the previous day.
Very confusing.

So I always wondered why the unix world is so focused on this format. When I started to work with JavaScript - where date is always in GMT - I even tried to fight against it.

Till I had the need of a real log. An external source provide a data feed and I needed to store it. It was a private project, logging power consumption. Everything seemed to work great, then I suddenly had strange results.
Why? Summer time. Suddenly the day had 25 hours, so the statistic was strange, a visible increase in consumption.

Now I finally understood the idea. Logging events and get the same timestamp twice from data in fact 60 minutes difference, makes the whole log useless.

Source of that feature was a feature request from the forum, read here:

As you can see, the demand was to get a correct logging time, including ms, in GMT zone, formated as string.

Hi Alfonso,
I think “basis” functions giving time values should be international while local should result from a conversion, not the opposite.
If a database is used in various timezones (across a big country, web…), only UTC is reliable.
It’s the same with https://es.wikipedia.org/wiki/Horario_de_veranodaylight savings>, as you mention: with local time, when the time is set backward, a record created after another can have an earlier timestamp. :doubt:
IMHO functions Hour and Date should have an optional parameter to say “give me UTC, not local” (unfortunately the * is already used; a second *? :wink: )


I agree with both.

As I say in my request, it is great to have this command in UTC.

I just would like to have it also , if possible, but for local time.