![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| timestamps | chriss_58 | Shell Programming and Scripting | 1 | 05-30-2008 05:12 AM |
| merging multiple timestamps into one | ChicagoBlues | UNIX for Advanced & Expert Users | 2 | 03-03-2008 06:21 PM |
| Difference between two timestamps | raman1605 | SUN Solaris | 8 | 08-05-2007 07:54 PM |
| Unix timestamps | hamsasal | UNIX for Dummies Questions & Answers | 3 | 09-07-2006 09:03 AM |
| silver osx no timestamps on posts | Optimus_P | Post Here to Contact Site Administrators and Moderators | 7 | 05-24-2003 03:06 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Arithmetic on timestamps
Hi Friends,
please advise on shell script to add two time stamps for example : a=12:32 b=12:00 c=a+b=00:32 please help me to find shell script to add to two time stamps, as i need to convert time from EST to GMT or SST to prepare status of jobs in unix and to specify estimated time to complete one job. thanks in advance Bali Reddy |
|
||||
|
if you know time diffrence
try this [root@Reddyraja reddy]# date +"%F %T" 2009-03-17 12:53:11 to add 10 minutes [root@Reddyraja reddy]# date +"%F %T" -d" 10 minutes" 2009-03-17 13:03:13 to subtract 10 minutes [root@Reddyraja reddy]# date +"%F %T" -d" 10 minutes ago" 2009-03-17 12:43:16 [root@Reddyraja reddy]# date +"%F %T" -d" 5 days 10 minutes ago" 2009-03-22 12:45:47 [root@Reddyraja reddy]# date +"%F %T" -d" 5 days ago 10 minutes ago" 2009-03-12 12:46:01 [root@Reddyraja reddy]# date +"%F %T" -d" 5 days ago 10 minutes " 2009-03-12 13:06:14 [root@Reddyraja reddy]# date +"%F %T" -d" 5 days 10 minutes " 2009-03-22 13:06:19 find unix time stamp in GST and export TZ=EST [root@Reddyraja reddy]# export TZ=IST [root@Reddyraja reddy]# date +%s 1237275038 [root@Reddyraja reddy]# date +"%F %T" -d@1237275038 2009-03-17 07:30:38 [root@Reddyraja reddy]# export TZ=EST [root@Reddyraja reddy]# date +"%F %T" -d@1237275038 2009-03-17 02:30:38 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|