Jump to content

Require help formatting the time


JeremyCanada26

Recommended Posts

if I have a number like -5 which represents the offset from UTC, how do I format a time that I already have in this format? 2010-04-30 11:38:56"

 

btw, 2010-04-30 11:38:56 is already in UTC

 

I'd preferably like to break it up into two parts afterwards. One that says "April 10th, 2010" and another that says "6:38 PM"  (with no leading zero's)

Link to comment
https://forums.phpfreaks.com/topic/202300-require-help-formatting-the-time/
Share on other sites

You're right JAY6390, I mistake. I have a delusion that adding hours, days etc. with just incrementing by NNN seconds might be incorrect, while function mktime() respect things like daylight saving time and leap years. Anyway I always use mktime rather than multiplying seconds.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.