Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Can date format current time for GMT timezone?

When I run date +"%Y%m%d%H%M%S" I receive 20171225203309 here in CET time zone.

Can I use date to obtain a the current time in the same format, but for timezone GMT?
by

1 Answer

Kajalsi45d
Use the following command:
TZ=GMT date
The same format:

TZ=GMT date +"%Y%m%d%H%M%S"
20171225194014

Login / Signup to Answer the Question.