03-16-2013
Displaying current date time of EDT in IST time
Hi Folks,
My server time is in EDT. And i am sending automated mails from that server in which i need to display the current date time as per IST (GMT+5:30). Please advice how to display the date time as per IST.
IST time leads 9:30 mins to EDT. and i wrote something like below.
timestamp=`date --date='+9 hour 30 minutes' '+%d/%b/%y %r'`
But The EDT time difference changes to 10 hrs on change of Daylight in every 6 months. How to dynamically do that.. Please Advice.
Thx in Advance...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I need to pass param on aix "errpt -a -s MMDDHHMMYY -e MMDDHHMMYY".
How do I read the date+time on the system and pass it as parameter? I need also the -s as previous day and the -e as current day.
Thanks,
itik (1 Reply)
Discussion started by: itik
1 Replies
2. Shell Programming and Scripting
Hi,
I need to get the date and time for past 1 hour from the current date. Anyone know how to do so?
Thanks (5 Replies)
Discussion started by: spch2o
5 Replies
3. Shell Programming and Scripting
Hi,
I have a log file with contents like
81.49.74.131 - -
81.49.74.131 - -
116.112.52.31 - -
116.112.52.31 - -
I need an output like this
81.49.74.131 14/Sep/2008 Time duration: 00:06:00
116.112.52.31 15/Sep/2008 Time duration: 00:00:01
Please anyone suggest a script for this.... (1 Reply)
Discussion started by: FuncMx
1 Replies
4. Solaris
Hi,
Can anybody tell me how to change time zone from ist to bst,
What changes should be done in /etc/TIMEZONE file.
wheather it is possible to change timezone without rebooting the server.
Regards
Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies
5. Shell Programming and Scripting
Hi,
I need to write a script, that will take the current date, time, and the output from # ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
and spit it to a file, so it'll look like this...
PID TID CLS RTPRIO NI PRI PSR %CPU STAT WCHAN COMMAND
1 1 TS... (2 Replies)
Discussion started by: Bloke
2 Replies
6. Shell Programming and Scripting
give a date and time:
Jun 12 21:05:16
06-12-2012 21:05:16
2012/06/12 21:05:16
How can i subtract these dates and times from the current date and time and get back the difference in seconds?
a one liner like:
echo "Jun 12 21:05:16" | some perl/awk programming
90900s (2 Replies)
Discussion started by: SkySmart
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I want to add some hours and minutes to the current date. For example, if the current date is "July 16, 2012 15:20", i want to add 5 hours 30 minutes to "July 16, 2012 00:00" not to "July 16, 2012 15:20". Please help.
Thanks! (4 Replies)
Discussion started by: manojgarg
4 Replies
8. Shell Programming and Scripting
i have file 1.txt
asdas|csada|13|03|10|04|23|A1|canberra
sdasd|sfdsf|13|04|26|23|28|A1|sydney
i want to add today's date and time in the end of each row
expected output
asdas|csada|13|03|10|04|23|A1|canberra|130430|1358
sdasd|sfdsf|13|04|26|23|28|A1|sydney|130430|1358
todays date... (10 Replies)
Discussion started by: radius
10 Replies
9. Shell Programming and Scripting
I have below file which contain the date in column 3,4,5
12345 open 10/10/13 10:08 PM 3 application is in java
67899 open 12/10/13 2:31 AM 2 apps can be reach
23456 open 11/9/13 2:31 AM 4 java is OK
65432 open 12/10/13 10:07 PM 9 we are... (1 Reply)
Discussion started by: vijay_rajni
1 Replies
10. UNIX for Beginners Questions & Answers
I am trying to work on a script to grab the UTC time from a website
So far I was able to cobble this together.
curl -s --head web-url | grep ^Date: | sed 's/Date: //g'
Which gives me the result I need.
Wed, 06 Dec 2017 21:43:50 GMT
What I need to is extract the 21:43:50 and convert... (4 Replies)
Discussion started by: allisterB
4 Replies
tztab(4) Kernel Interfaces Manual tztab(4)
NAME
tztab - time zone adjustment table for date and ctime()
DESCRIPTION
The file describes the differences between Coordinated Universal Time (UTC) and local time. Several local areas can be represented simul-
taneously with historical detail.
The file consists of one or more time zone adjustment entries. The first line of the entry contains a unique string that may match the
value of the string in the user's environment. The format is where is the time zone name or abbreviation, diff is the difference in hours
from UTC, and is the name or abbreviation of the "Daylight Savings" time zone. Fractional values of diff are expressed in minutes preceded
by a colon. Each such string will start with an alphabetic character.
The second and subsequent lines of each entry details the time zone adjustments for that time zone. The lines contain seven fields each.
The first six fields specify the first minute in which the time zone adjustment, specified in the seventh field, applies. The fields are
separated by spaces or tabs. The first six are integer patterns that specify the minute (0-59), hour (0-23), day of the month (1-31),
month of the year (1-12), year (1970-2038), and day of the week (0-6, with 0=Sunday). The minute, hour, and month of the year must contain
a number in the (respective) range indicated above. The day of the month, year, and day of the week can contain a number as above or two
numbers separated by a minus (indicating an inclusive range). Either the day of the month or the day of the week field must be a range,
the other must be simple number.
The seventh field is a string that describes the time zone adjustment in its simplest form: where is an alphabetic string giving the time
zone name or abbreviation, and diff is the difference in hours from UTC. must match either the field or the field in the first line of the
time zone adjustment entry. Any fractional diff is shown in minutes.
Comments begin with a in the first column, and include all characters up to a newline. Comments are ignored.
EXTERNAL INFLUENCES
International Code Set Support
Single-byte character code sets are supported.
EXAMPLES
The time zone adjustment table for the Eastern Time Zone in the United States is:
Normally (as indicated in the first line) Eastern Standard Time is five hours earlier than UTC. During Daylight Savings time, it changes
to a 4 hour difference. The first time Daylight Savings Time took effect (second line) was on January 6, 1974 at 3:00 a.m., EDT. Note
that the minute before was 1:59 a.m., EST. The change back to standard time took effect (sixth line) on the last Sunday in November of the
same year. At that point, the time went from 1:59 a.m., EDT to 1:00 a.m., EST. The transition to Daylight Savings Time since then has
gone from the last Sunday in February (third line) to the last Sunday in April (fourth line) to the first Sunday in April (fifth line).
The return to standard time for the same period has remained at the last Sunday in October (seventh line).
AUTHOR
was developed by HP.
FILES
SEE ALSO
date(1), ctime(3C), environ(5).
tztab(4)