[rrd-users] Re: Help with Bash script to calc end-time in

This is a discussion on [rrd-users] Re: Help with Bash script to calc end-time in within the RRD Users forums, part of the Networking and Network Related category; Rob Conway wrote: >I just use "date +%s" to get the unix time but how can I ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-18-2006
Simon Hobson
 
Posts: n/a
Default [rrd-users] Re: Help with Bash script to calc end-time in

Rob Conway wrote:

>I just use "date +%s" to get the unix time but how can I easily
>round this value ?


etime=`date +%s`
step=300
etime=$(( ${etime} - ( ${etime} % ${step} ) ))

Now, can someone show me how to convert the resulting end time to a
human readable form - eg so I can use it in a gprint statement ?

--
Unsubscribe mailto:rrd-users-request@list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:00 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0