Sponsored Content
Full Discussion: GMT to local Time conversion
Top Forums Shell Programming and Scripting GMT to local Time conversion Post 302988694 by mrn6430 on Saturday 31st of December 2016 05:32:20 AM
Old 12-31-2016
But how do I convert that GMT time mmddccyyhhmmss format stored in variable LOG_TME from my code above to CST time or local time and store that it NLOG_TME variable ?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

conversion from EPOCH timestamp to local time zone

hello gurus, i want a perl/shell script which once invoked should convert a set of EPOCH timestamps to local time ( IST..i want) . how does it work ,i have an idea on that..but writing a perl/shell script for it is not possible for me...so i need help for the same. my exact requirement is... (2 Replies)
Discussion started by: abhijeetkul
2 Replies

2. Shell Programming and Scripting

Script to convert GMT to Asia/Hong Kong time

hi friends, this is my first time with this type of script so please pardon my ignorance. i have this script in which a piece of code needs to be added which can have the Asia/Hong kong time as well. system date and format is GMT so no problem with GMT and even EST is covered..i have ato add new... (5 Replies)
Discussion started by: xejatt
5 Replies

3. HP-UX

change time mode from BST to GMT

I want to know how to change the time zone from BST to GMT avoid the daylight savings in hp-ux (3 Replies)
Discussion started by: tomjones
3 Replies

4. AIX

Convert UTC time to local time ?

Hello, Using AIX6.1 box. I have UTC time value and need to convert it to local time value - I mean time zone and DST should be taken into consideration. I hope it could be done using shell environment - I don't want to write a program. thanks Vilius ---------- Post updated at 02:30 PM... (2 Replies)
Discussion started by: vilius
2 Replies

5. UNIX for Dummies Questions & Answers

UTC time and Local time

Hi, A few days ago I changed my CentOS box's timezone to -07:00. Now the date commands output look like this (run almost simultaneously, less than 1 second delay).. # date Mon Sep 5 20:23:40 PDT 2011 # date -u Tue Sep 6 03:24:05 UTC 2011 The hours difference seems correct, but why is... (2 Replies)
Discussion started by: forte712
2 Replies

6. Post Here to Contact Site Administrators and Moderators

Server Upgrade Scheduled for Today - 7:30 GMT (2:30 PM Eastern Time)

Dear All, Today, somewhere around 7:30 GMT (2:30 PM Eastern Time) www.unix.com will go down for what we hope is around 15 - 20 minutes as we change out some hardware on the server. Thank you for your patience and support. Neo (0 Replies)
Discussion started by: Neo
0 Replies

7. Shell Programming and Scripting

GMT to MST timestamp conversion

Hi Team, We have written a perl script to perform the GMT to MST timestamp conversion. Input: 2013-12-01T05:23:19.374 Output: need the given timestamp in MT (MST/MDT) #!/usr/bin/perl use strict; use warnings; use Time::Local; #always gmt #my $tval = '2013-12-01T05:23:19.374'; ... (4 Replies)
Discussion started by: kmanivan82
4 Replies

8. Shell Programming and Scripting

Local time to GMT time

Gents, Please can help with this. the column in red is the local time the column in blue is the GPStime 4153152529951 2/12/17 12:00:04.980 951 2960 41531.0 52529.0 1170882022980002 4108153261942 2/12/17 12:00:07.944 942 2959 41081.0 53261.0 1170882025944002 41511523611660... (7 Replies)
Discussion started by: jiam912
7 Replies

9. Solaris

Convert GMT date and time to CST

I need away to convert the following GMT date and time value RAW_TME= 042720171530 "mmddccyyhhmm" to Localhost time. In this case it is in central time. Here is what I came up with but it does not look efficient: RAW_TME=042720171530 logmm=`echo $RAW_TME | cut -c1-2` logdd=`echo $RAW_TME |... (4 Replies)
Discussion started by: mrn6430
4 Replies
tzfile(4)						     Kernel Interfaces Manual							 tzfile(4)

NAME
tzfile - Time zone information SYNOPSIS
#include <tzfile.h> DESCRIPTION
The time zone information files used by tzset(3) begin with bytes reserved for future use, followed by six four-byte values, written in a standard byte order (that is, with the high-order byte of the value written first). These values are, in order: The number of GMT/local indicators stored in the file. The number of standard/wall indicators stored in the file. The number of leap seconds for which data is stored in the file. The number of transition times for which data is stored in the file. The number of local time types for which data is stored in the file. (This value must not be zero.) The number of characters of time zone abbreviation strings stored in the file. The above header is followed by tzh_timecnt four-byte values, sorted in ascending order. These values are written in standard byte order. Each is used as a transition time (as returned by time(3)) at which the rules for computing local time change. Next come tzh_timecnt one- byte values of type unsigned char. Each value tells which of the different local time types described in the file is associated with the same-indexed transition time. These values serve as indices into an array of ttinfo structures that appears next in the file. These structures are defined as follows: struct ttinfo { long tt_gmtoff; int tt_isdst; unsigned int tt_abbrind; }; Each structure is written as a four-byte value for tt_gmtoff of type long, in a standard byte order, followed by a one-byte value for tt_isdst and a one-byte value for tt_abbrind. In each structure, tt_gmtoff gives the number of seconds to be added to GMT, tt_isdst tells whether tm_isdst should be set by localtime(3) and tt_abbrind serves as an index into the array of time zone abbreviation characters that follow the ttinfo structure(s) in the file. Next, there are tzh_leapcnt pairs of four-byte values, written in standard byte order. The first value of each pair gives the time (as returned by time(3)) at which a leap second occurs. The second gives the total number of leap seconds to be applied after the given time. The pairs of values are sorted in ascending order by time. Then there are tzh_ttisstdcnt standard/wall indicators, each stored as a one-byte value. They tell whether the transition times associated with local time types were specified as standard time or wall clock time, and are used when a time zone file is used in handling POSIX- style time zone environment variables. Fnally, there are tzh_ttisgmtcnt GMT/local indicators, each stored as a one-byte value; they tell whether the transition times associated with local time types were specified as GMT or local time, and are used when a time zone file is used in handling POSIX-style time zone environment variables. The localtime(3) call uses the first standard-time ttinfo structure in the file (or simply the first ttinfo structure, in the absence of a standard-time structure) if either tzh_timecnt is zero or the time argument is less than the first transition time recorded in the file. RELATED INFORMATION
ctime(3) delim off tzfile(4)
All times are GMT -4. The time now is 07:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy