[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49748: 27.2; format-time-string returns 30 minutes for the value zer
From: |
Lars Ingebrigtsen |
Subject: |
bug#49748: 27.2; format-time-string returns 30 minutes for the value zero |
Date: |
Wed, 28 Jul 2021 17:27:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hosein <naghdbishi@riseup.net> writes:
> Hi, I expected (format-time-string "%M:%S" 0)) to return "00:00" but
> since I live in a GMT+3:30 time zone it returns "30:00".
>
> Same is true for
> (format-time-string "%Y, %D, %H, %M, %s, %z%S" 0)
> which returns:
>
> "1970, 01/01/70, 03, 30, 0, +033000"
This is how it's designed to work:
(format-time-string "%H:%M:%S" 0)
=> "01:00:00"
here. If you want the string formatted in universal time, say:
(format-time-string "%H:%M:%S" 0 t)
"00:00:00"
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no