SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2012
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    date function gives wrong date?

    Hey guys! So when I use the date function to give the current date (say it was 11/2/12), it would give the wrong date (11/3/12). I have the default timezone function set to EDT (eastern time?), but it still give the day after it's supposed to. Does anyone know what's happening?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,613
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Where are you located, and where is your server located?

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2012
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm located on the east coast of the U.S. but i'm not sure where the server is located..

  4. #4
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    4,823
    Mentioned
    142 Post(s)
    Tagged
    0 Thread(s)
    Have you tried using
    PHP Code:
    date_default_timezone_set('America/New_York'); 
    Or any of the America acceptable timezones
    Be sure to congratulate xMog on earning April's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •