Convert timezone


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Convert timezone
# 1  
Old 03-10-2010
Convert timezone

Hi,

I have date with my server's timezone. I want to convert it with another timezone either EST or GMT, found Date:Manip module but cant find exact use, can anyone help...
# 2  
Old 03-10-2010
Use TZ variable
# 3  
Old 03-10-2010
Is this date string in a log file or suchlike? If so can you provide an example?
# 4  
Old 03-10-2010
date is not in any log file... just got Date_ConvTZ function from Date:Manip module, solved my problem

Thanks all
# 5  
Old 03-24-2010
PHP function for Time Zone conversion

I recently found that PHP doesn't have an inbuilt function for conversion of time/date between multiple time zones and neither could I find a third-party function for the purpose. However, I did find the PEAR class which has inbuilt support for multiple time-zones but it cannot be used by "including" itself in the php page. PEAR class can be used only after installation, which may not be feasible in each and every case.
To avoid the hassles of installation I have written a set of 3 functions in PHP which wil allows you to -

1. Convert GMT to local time zone
2. Convert local time zone to GMT
3. Convert between two different time zones.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

TIMEZONE problem..

hii there... can you guys help me with TIMEZONE setting on my solaris box i tried to edit cat /etc/TIMEZONE..but i think it will work after rebooting, but something i did which took me to GMT my problem is i have this issue on a server, and i have to fix this without rebooting. thanks for... (1 Reply)
Discussion started by: 6pound
1 Replies

2. Solaris

timezone issue

Hi, On my server timezone is IST, so I have configured the sudo for user to change the date, but when he is changing the date time zone is also getting changed from ist to gmt. using solaris 10. I have checked in /etc/TIMEZONE file in that it is showing TZ=Asia/Calcutta, wheather any other file... (1 Reply)
Discussion started by: manoj.solaris
1 Replies

3. Red Hat

changing timezone

Hi, I would like to change time zone Linux from IST to US/Canada but not getting the option , I have run the command setup -> timezone configuration but not getting the option of us/canada or pacific us/canada. Please suggest. Regards, Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies

4. Shell Programming and Scripting

convert timezone into human output

Hi I have a command which returns a timezone, Ej: root@bsades2: /usr/local/bin # lsuser -a time_last_login israel israel time_last_login=1279032223 Question: I want to parse this timezone '1279032223' into a 'martes, 13 de julio de 2010 16:43:43' from the ksh shell. Is itt possible? ... (3 Replies)
Discussion started by: iga3725
3 Replies

5. Shell Programming and Scripting

Help with timezone conversion

Hi, Date_ConvTZ of module Date:Manip, converts time zone to specified server but without day time savings... $mod = Date_ConvTZ($date,"$thisTZ","$serverTZ"); US and UK timezone difference is 5 hrs, but above function will return difference of 4 hrs. Please help (1 Reply)
Discussion started by: darshakraut
1 Replies

6. Solaris

Crontab and timezone

I am running SunOS 5.6. If I login with a ksh shell and type 'date'. I get the correct date and time related to the TZ, that is, >Tuesday July 27 09:50:25 NZST 2004 However, if I run under crontab, I get this. >Mon Jul 26 20:49:00 ESTEDT 2004 My question is; Does anyone know how to fix this... (2 Replies)
Discussion started by: lbeard
2 Replies

7. UNIX for Advanced & Expert Users

Timezone

HI ; I got Solaris8 installed oon Sunfire V440 .I have TZ=GMT in /etc/TIMEZONE , but when i log in as root i see the date in GMT+1. So i have every time to "set TZ=GMT ; export $TZ" . How can i set the TZ=GMT at the startup defenitely. Thanks :) (7 Replies)
Discussion started by: oss
7 Replies

8. UNIX for Dummies Questions & Answers

timezone

Hi, i am searching to change the timezone on a HP-UX11 system. Since last weekend the summertime started i am not able to change the time to the new time, every day the time changes back to wintertime. I think the problem is that the server is on the wrong timezone. Can someone help me please?... (1 Reply)
Discussion started by: eddyvdv
1 Replies

9. UNIX for Dummies Questions & Answers

Timezone

Hi, I got an question about changing timezone thrue command line on a SunOS Release 4.1.2 without restarting the computer. Now it's set on WET and I want to set the timezone to CET (GMT +1) Plz somebody help me. Regards Novisern:confused: (5 Replies)
Discussion started by: Novisern
5 Replies

10. UNIX for Dummies Questions & Answers

Timezone

Hello again, under hp-ux i have a file /etc/TIMEZONE. here is definied which timezone i am. i dont know who reads this file to set after reading the timezone under /usr/lib/tztab. my 2 questions, who reads the file /etc/TIMEZONE ( which service ) and do i need in the first line to set my... (6 Replies)
Discussion started by: ortsvorsteher
6 Replies
Login or Register to Ask a Question