image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Design & Media

Reply
 
Thread Tools
  #1  
Old January 4th, 2003, 04:17 PM
Da_iMac_Daddy's Avatar
Not-so-Neo-DumbA$$
 
Join Date: Sep 2002
Location: Dover, Delaware USA
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Da_iMac_Daddy is on a distinguished road
Date and time in PHP...

I have just started using gmdate() to add the date to the top of my news postings. The problem is I get the right date, but the time is about 5 hours off.
Anyone know how to get it to use my time instead of the servers?

:edited for forgetfulness:
__________________
Nathan Coffield
Apple iBook;
AMD 3400 3GB of RAM, 250GB SATA HD, 19" Wide Screen Monitor, Windows XP Home, VMWare running Slackware 11 for development purposes, Apache 2.2, PHP 5;

Home Page
Reply With Quote
  #2  
Old January 4th, 2003, 07:13 PM
slur's Avatar
Geek / Hedonist
 
Join Date: Dec 2000
Location: Florence, MA
Posts: 542
Thanks: 0
Thanked 0 Times in 0 Posts
slur is on a distinguished road
You're getting the Greenwich Meantime date, not your local date. For the local date use date() instead. This might help too.
__________________
|
| slur was here
|

check out my creative music software
Reply With Quote
  #3  
Old January 5th, 2003, 12:48 AM
TommyWillB's Avatar
Registered User
 
Join Date: Mar 2001
Location: ol' Gay San Francisco
Posts: 2,000
Thanks: 0
Thanked 0 Times in 0 Posts
TommyWillB is on a distinguished road
Greenwich Mean Time (or GMT) is sometimes called Universal Time.
__________________
TommyWillB
Intel iMac 250GB external drive
TommyWillB.com hosted on Mac OS X 10.4.x / Apache 1.3.x / PHP 4.x
Reply With Quote
  #4  
Old January 5th, 2003, 07:17 PM
Da_iMac_Daddy's Avatar
Not-so-Neo-DumbA$$
 
Join Date: Sep 2002
Location: Dover, Delaware USA
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Da_iMac_Daddy is on a distinguished road
date() was giving me the wrong date and gmdate() was giving me the wrong time :\ anyway I can set it to use a specific time zone? or something like that?
__________________
Nathan Coffield
Apple iBook;
AMD 3400 3GB of RAM, 250GB SATA HD, 19" Wide Screen Monitor, Windows XP Home, VMWare running Slackware 11 for development purposes, Apache 2.2, PHP 5;

Home Page
Reply With Quote
Reply

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
os x 10.2.4 forgets the time and date lilbandit Mac OS X System & Mac Software 6 March 26th, 2003 12:19 AM
Setup date and time simon1663 Mac OS X System & Mac Software 3 September 15th, 2002 11:30 AM
regular users cannot set date and time solrac Mac OS X System & Mac Software 0 August 12th, 2002 04:02 AM
Date and time lost booting into 10.1? gidds Mac OS X System & Mac Software 2 October 21st, 2001 08:32 PM
ntp time sync problem WhateverJoe Mac OS X System & Mac Software 1 September 20th, 2001 11:56 AM


All times are GMT -5. The time now is 04:17 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.