date math

Home Forums Tech Support date math

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #67962
    linuxgnuru
    Participant

    let’s say I have a text file with just outputs from the date command. Anyone know how to take that and calculate hours?
    i.e.

    Code:
    Mon Dec 5 15:20:15 EAT 2016
    Tue Dec 6 01:20:34 EAT 2016

    Tue Dec 6 09:44:15 EAT 2016
    Tue Dec 6 12:41:34 EAT 2016

    so; how many hours wold that be? and better still; how can one calculate that with a script?

    #77135
    Frojoe
    Keymaster

    Convert the timestamps to unix time (which is just seconds since Jan 1 1970), and then do whatever math you want. You’ll have the results in seconds, which you can convert to hours, parsecs, centons, marklars or whatever.

    #77138
    __eMpTy__
    Participant
    Frojoe wrote:
    Convert the timestamps to unix time (which is just seconds since Jan 1 1970), and then do whatever math you want. You’ll have the results in seconds, which you can convert to hours, PARASECS, centons, marklars or whatever.

    http://i.imgur.com/9jeBDaV.jpg
    src: https://en.wikipedia.org/wiki/Parsec

    #77139
    Frojoe
    Keymaster
    __eMpTy__ wrote:
    Frojoe wrote:
    Convert the timestamps to unix time (which is just seconds since Jan 1 1970), and then do whatever math you want. You’ll have the results in seconds, which you can convert to hours, PARASECS, centons, marklars or whatever.

    http://i.imgur.com/9jeBDaV.jpg
    src: https://en.wikipedia.org/wiki/Parsec

    #77142
    thelionroars
    Member

    You’re both wrong, parasex is having sex in a wheelchair

    #77160
    strider
    Participant

    A probability of 2 chairs by more than 80%.

    #77173
    Orn
    Participant

    Too bad coz all you get is a frozen potato

    #77211
    strider
    Participant

    I like french fries with ketchup.

    #77215
    __eMpTy__
    Participant
    Orn wrote:
    Too bad coz all you get is a frozen potato
    strider wrote:
    I like french fries with ketchup.

    Frozen_Potato + Ketchup !== French_Fries

    …unless you ask a fried frenchman.

    #77216
    linuxgnuru
    Participant
    Quote:
    Frozen_Potato + Ketchup !== French_Fries

    but it does == hash browns

    #77219
    Orn
    Participant
    linuxgnuru wrote:
    but it does == hash browns

    Wut ar doez?

    #77236
    linuxgnuru
    Participant

    tumblr_lmv4syevLP1qjpsr4o1_1280.jpg

    #77237
    Orn
    Participant

    so potato spaghetti ?

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.