Thread overview
how to get current timestamp?
Jan 02, 2020
Ferhat Kurtulmuş
Jan 02, 2020
bachmeier
Jan 02, 2020
Ferhat Kurtulmuş
January 02, 2020
Is there any built-in method returning current timestamp like doing it in python like: time.time() which returns something like 1577990478.4675508?
January 02, 2020
On Thursday, 2 January 2020 at 18:41:59 UTC, Ferhat Kurtulmuş wrote:
> Is there any built-in method returning current timestamp like doing it in python like: time.time() which returns something like 1577990478.4675508?

I use

import std.datetime;
Clock.currTime().toISOExtString()
January 02, 2020
On Thursday, 2 January 2020 at 18:56:37 UTC, bachmeier wrote:
> On Thursday, 2 January 2020 at 18:41:59 UTC, Ferhat Kurtulmuş wrote:
>> Is there any built-in method returning current timestamp like doing it in python like: time.time() which returns something like 1577990478.4675508?
>
> I use
>
> import std.datetime;
> Clock.currTime().toISOExtString()

Thank you. However, UnixTime is what I was looking for.

Clock.currTime.toUnixTime()