date command time correction

From: Tom Lepkowski (tlep_at_post.harvard.edu)
Date: 08/29/03

  • Next message: Barry Margolin: "Re: date command time correction"
    Date: 29 Aug 2003 08:55:04 -0700
    
    

    Hello,

    Saying date -d EDT will not work b/c EDT is ambiguous.

    My unix machine provides the date in UTC . What is the date argument
    to add or subtract hours from date output?

    Output:
    [me@server home]$ date
    Fri Aug 29 15:50:01 UTC 2003

    I need date to print "Fri Aug 29 11:50:01 EDT 2003"

    So, besides formatting (which I can do) I need to subtract 6 hours.

    Thanks for any help.
    -Tom


  • Next message: Barry Margolin: "Re: date command time correction"

    Relevant Pages

    • Re: Dates
      ... manipulation), but you need to stipulate that your input time is UTC ... To simply subtract eight hours: ... See the docs for other formatting options. ...
      (perl.beginners)
    • Re: time conversion question
      ... > when in comes to converting the date. ... > In the METAR data is the time of the last observartion given ... > is the hour and mm is the minute, all values in UTC. ... subtract one from the year and set the month to 12. ...
      (comp.lang.tcl)
    • Re: date and time in matlab
      ... and subtract eps() of that result. ... this simple algorithm will fail for leap seconds if the ... time is expressed in UTC, as "the last time just before it becomes ...
      (comp.soft-sys.matlab)
    • Re: calc difference in times in different time zones
      ... Steve wrote: ... One way is to convert the times to UTC and subtract. ... Brian Tillman ...
      (microsoft.public.outlook)