Yeah, the second one is a little obscure, because of a couple of issues.
-`UTC` isn't exported from the Dates module, so you'll have to use
`Dates.UTC`
-`UTC` is a *type* instead of a instance of a type, (that's what the
::Type{UTC} means)
So the correct way to call this is
now(Dates.UTC)
On Mon, May 4, 2015 at 12:02 PM, Irving Rabin <[email protected]> wrote:
> 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.
>
>
>
>