Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
google site



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-10-2010
Registered User
 

Join Date: May 2008
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
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...
Sponsored Links
  #2  
Old 03-10-2010
dennis.jacob's Avatar
dj - the student
 

Join Date: Feb 2007
Location: Bangalore/Cochin
Posts: 860
Thanks: 0
Thanked 5 Times in 4 Posts
Use TZ variable
  #3  
Old 03-10-2010
fpmurphy's Avatar
Moderator
 

Join Date: Dec 2003
Location: /dev/eou
Posts: 2,385
Thanks: 0
Thanked 21 Times in 20 Posts
Is this date string in a log file or suchlike? If so can you provide an example?
  #4  
Old 03-10-2010
Registered User
 

Join Date: May 2008
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
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
Registered User
 

Join Date: Feb 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Crontab and timezone lbeard Solaris 2 07-25-2007 11:55 PM
Timezone oss UNIX for Advanced & Expert Users 7 10-20-2005 02:20 AM
timezone eddyvdv UNIX for Dummies Questions & Answers 1 04-08-2002 05:46 PM
Timezone Novisern UNIX for Dummies Questions & Answers 5 03-28-2002 07:13 PM
Timezone ortsvorsteher UNIX for Dummies Questions & Answers 6 03-07-2002 04:08 AM



All times are GMT -4. The time now is 07:37 AM.