Le lundi 04 mai 2015 à 11:02 -0700, Irving Rabin a écrit :
> Folks, I am a Julia newcomer. I need to get current time. And now()
> works just fine. But it returns a local time. And I need GMT time.
>
> I got to documentation. It gave me very nice description:
>
>
> now() → DateTime
>
> Returns a DateTime corresponding to the user’s system time
> including the system timezone locale.
>
> now(::Type{UTC}) → DateTime
>
> Returns a DateTime corresponding to the user’s system time as
> UTC/GMT.
>
> I spent an hour and still couldn't figure out how to call the second
> method.
Just like this:
julia> using Base.Dates
julia> now(UTC)
2015-05-04T18:07:16.464
If you think that's unclear, maybe you could make a pull request to
improve the documentation? Showing how to make the call could be useful.
Regards