Current location: Hot Scripts Forums » Programming Languages » PHP » Time Converter


Time Converter

Reply
  #1 (permalink)  
Old 12-01-05, 10:14 AM
Pointblank Pointblank is offline
New Member
 
Join Date: Nov 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Post Time Converter

Hey, im looking for someway to create a time converter where the user can type in a time and date (optional) and have it changed to any timezone
Im ok at php and mysql so does anyone know any good tutorials and/or downloads of such a script (free) as i cant find any on hotscipts.

Thanks alot, sorry if its in the wrong forum.

Point
Reply With Quote
  #2 (permalink)  
Old 12-01-05, 02:05 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
look at gmdate(), mktime() and strtotime()
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #3 (permalink)  
Old 12-01-05, 03:59 PM
Pointblank Pointblank is offline
New Member
 
Join Date: Nov 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Any tutorials for this cause im not very good at just randomly getting code and shoving it together and hoping it works

any help is appreciated
Reply With Quote
  #4 (permalink)  
Old 12-01-05, 07:08 PM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
PHP Code:

date ("M j, Y H:i"mktime ($hour $gmt,$minute,$second,$month,$day,$year)); 

this displays time in a gmt+x way, just the way a user can set.
e.i: i want gmt+1, so i set gtm to gmt+1 in my user preferences, and it dislpays the time in gmt+1.
the $gmt is the number that you have to add/diminish to/from $hour, the other vars are necessary because of the date.

Greetz,
UnrealEd
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change a dynamic object like time? LEN2884 C/C++ 0 05-27-05 04:55 AM
time adjustment dex002 PHP 2 05-09-05 12:50 PM
Reduce the time intensive phases of .Net application development using TierDeveloper3 smars General Advertisements 0 12-02-03 05:15 AM
Showing time is users time zone? Nasimov PHP 1 11-20-03 07:14 AM


All times are GMT -5. The time now is 06:22 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.