emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-table change time from UTC to other timezones


From: Maxim Nikulin
Subject: Re: org-table change time from UTC to other timezones
Date: Sat, 12 Dec 2020 23:04:04 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

2020-12-12 Alan E. Davis wrote:

Thank for the clear explanation.  My little problem seems to require a super steam hammer.  Your insights are most helpful.

You do not need a steam hammer. There are a number of tools around. Some of hammers however could not deal with all nails.

Even "date" util could be used to convert between timestamps and human readable representation, between timezones. It could even do some arithmetic

date --utc -d @1234567890
Fri Feb 13 23:31:30 UTC 2009

date -d 'now' +%s
1607787784

date -d 'now +10hours' +%s
1607823786

TZ=America/New_York date -d "@`TZ=Europe/Berlin date -d '2020-11-10 09:08:07 +10hours' '+%s'`"
Mon Nov  9 19:08:07 EST 2020

In my opinion, org mode is too rigid in respect to timestamp format. Sometimes I would prefer to specify timestamps with timezone.

Well known example of idiosyncrasy of particular applications. Timestamps in xls files are represented by floating point numbers, namely days since 1 Jan 1900, fractional part is time. Unfortunately 1900 is not a leap year, so to avoid unnecessary complications of code and keep memory footprint small, on Macs epoch starts in 1904, on windows year 1900 has Feb, 29...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]