Jump to content

date


dezkit

Recommended Posts

I'm sure there's an easier way, but also?

<?php
$hour = date("H");
$min = date("i");
$sec = date("s");
$month = date("F");
$day = date("d");
$year = date("Y");
$offset = -5;
echo date("F d Y H:i:s T", mktime($hour+$offset,$min,$sec,$month,$day,$year));
?>

 

I know you can also do things, like ...

<?php date("F d Y H:i:s T", strtotime("+1 day")); ?>

 

Maybe try playing around with ...

<?php date("F d Y H:i:s T", strtotime("-5 hour")); ?>

 

I've never messed around with it before so I don't know. Just some other things to think about.

Link to comment
https://forums.phpfreaks.com/topic/97454-date/#findComment-498657
Share on other sites

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.