Convert time (YYYYMMDD HHMMSS) to UTC


 
Thread Tools Search this Thread
Operating Systems AIX Convert time (YYYYMMDD HHMMSS) to UTC
# 1  
Old 01-07-2011
Convert time (YYYYMMDD HHMMSS) to UTC

Okay, so let's say we have a string like:

20110105_193345

This represents:

January 5th, 2011 = 20110105

24-hour style time 19:33:45 = 193345

Okay, so we have our time. It's January 5th, 2011 at 19:33:45. I want to convert this time from Eastern Time Zone (which it currently is in) into UTC.


Now, in linux I could do this by using the date command and convert it to EPOCH, change my time zone TZ, and then convert it back. The date command in AIX does not have this functionality. Any ideas?

I'd like to do this without using perl if possible.
# 2  
Old 01-07-2011
Could you please explain why you don't want to use Perl?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to split timestamp and put a dot between YYYYMMDD and HHMMSS?

I have a string time=20170303201234 I want to split it and put a dot result: 20170303.201234 CODE: ttdotss=`echo ${time} | {8}.{8}` Doesn't understand I tried this: CODE: ttdotss=`echo ${time} |cut -c 1-8 | . | cut -c 9-14` Result: script: .: argument expected... (4 Replies)
Discussion started by: digioleg54
4 Replies

2. Shell Programming and Scripting

Convert UTC time into current UNIX sever time zone

Hi guys thanks for the help for my previous posts.Now i have a requirement that i download a XMl file which has UTC time stamp.I need to convert UTC time into Unix server timezone. For ex if the time zone of unix server is CDT then i need to convert into CDT.whatever may be the system time... (5 Replies)
Discussion started by: mohanalakshmi
5 Replies

3. 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

4. Shell Programming and Scripting

Find and Convert UTC Time to PST Time

Hello All - I have a script that grabs data from the net and outputs the following data 46029 46.144 -124.510 2010 07 26 22 50 320 4.0 6.0 2.2 9 6.8 311 1012.1 -0.9 13.3 13.5 13.3 - - 46041 47.353 -124.731 2010 07 26 22 50 250 2.0 3.0 1.6 8 6.4 - 1011.6 - ... (0 Replies)
Discussion started by: drexnefex
0 Replies

5. 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

6. Shell Programming and Scripting

Convert UTC time to Date

Hi, I need to convert a number representing time in UTC seconds to a date. Ex: 3BE0082C --> Oct 31 2001 15:31:08 I have tried the following perl command but it gives a different answer? $ perl -e 'print scalar localtime(shift), "\n"' 3BE00B2C Thu Jan 1 03:00:03 1970 Any ideas? Thanks. :) (10 Replies)
Discussion started by: GNMIKE
10 Replies

7. Shell Programming and Scripting

convert date format YYYYMMDD to MM/DD/YYYY

In my shell script i have a variable which stores date in the format of YYYYMMDD. Is there any way to format this value to MM/DD/YYYY. Thanks. (8 Replies)
Discussion started by: nasirgondal
8 Replies

8. Shell Programming and Scripting

Using awk to convert DD-MMM-YY to YYYYMMDD

Hi i need to convert a date in the format DD-Mon-YY to YYYYDDMM Ex : 01-JUL-00 to 20000701 Can anybdy help me with this?? Thanks in advance Shenaz (5 Replies)
Discussion started by: shanu_85
5 Replies

9. UNIX for Dummies Questions & Answers

how to convert the string YYYYMMDD into YYYY.MM.DD

how to convert the string YYYYMMDD into YYYY.MM.DD Please advice (1 Reply)
Discussion started by: spatra
1 Replies

10. Shell Programming and Scripting

Convert filenames with DDMMYYYY to YYYYMMDD

Okay, I have posted on here one other time and received very fast help, so I figured I'd post again. Searched for awhile and couldn't find exactly what I'm looking for. I am attempting to write a script that will search through a given directory, or search through the current directory, and... (10 Replies)
Discussion started by: cbo0485
10 Replies
Login or Register to Ask a Question