SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    May 2008
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    formatting date/time in php

    i know this might sound easy.i have been trying to format date and time in my project.
    1. EST(GMT-5:00)
    2. date on my system that is my laptop

    below are the two codes i have used,but is not accurate as i want it to be;
    PHP Code:
    gmdate("h:i:s A");//EST(GMT-5:00)
    date("M,d,Y"); //date on my system 
    i know am wrong somewhere but can'figure it out.can someone help me.

    cheers

  2. #2
    SitePoint Evangelist
    Join Date
    Oct 2005
    Location
    Michigan, USA
    Posts
    434
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    gmdate will give you Greenwich Mean Time. I can't figure out from what you said just what you want. Two dates?
    - Robert

  3. #3
    SitePoint Addict
    Join Date
    May 2008
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes i want to format the date in EST and also a separate code for formatting time to the time on my sytem.so two separate things


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
  •