dannyman.toldme.com

About Me : Free Style : Good Reads : News and Reaction : Photographs : Technical : Travels : Unsorted

Search:
May 6, 2008
FreeBSD, Linux, Mac OS X, Technical

Mini-HOWTO: What Time is UTC?

I wanted to know what time it was in UTC, but I forgot my local offset. (It changes twice a year!) I figured I could look in the date man page, but I came up with an “easier” solution. Simply fudge the time zone and then ask.

0-20:57 djh@noneedto ~$ env TZ=UTC date
Tue May  6 03:57:07 UTC 2008

The env bit is not needed in bash, but it makes tcsh happy.

(Thanks, Saul and Dave for improving my knowledge.)

Read More

Next Post
Canon i250 on Ubuntu 8.04
Previous Post
WordPress 2.5.1
Other Posts in The Same Categories
FreeBSD, Linux, Mac OS X, Technical
Possibly-Related Posts
Local Time: Tomorrow
Hostel-Dwelling Swede Getting Laid Big-Time
Ugh, Thursdays!
Time Management
Unix Trick: Block-and-Page

Responses

May 6th, 2008

dbt

env TZ= date works just as well, without needing to be undone…

May 6th, 2008

dannyman

(Thanks, dbt . . . this post just got a lot shorter. ;)

Post a Public Comment

The Rules:

  1. For private messages, e-mail me: dannyman@toldme.com
  2. I will not publish or share your e-mail address.
  3. I will not spam you.
  4. Therefor: no anonymous posts; send me your e-mail address!
(required)
(required)

. . . comments from new posters will be held for screening.

Danny Howard is 100% responsible for the content on this site, except some of it is stolen.

All rights are reserved, unless otherwise noted. Generally, I'm a BSD guy, so you can assume implicit permission to adapt, modify, and redistribute my intellectual property with appropriate attribution. Except some of this content is itself re-appropriated, so you'd best ask first, especially for commercial use. Thanks!

You can contact me via e-mail: dannyman@toldme.com

Most of http://dannyman.toldme.com/ is powered by WordPress.

If you're hip to RSS and whatnot, you can subscribe to this site.

These links are for dannyman: login AND backlinks