admin
Administrator
     
Offline
Posts: 236
|
 |
« on: November 24, 2020, 08:48: PM » |
|
my server was 5 hours ahead and I needed to store the fixed local time ( meaning no other time zones would be needed)
<?php $hour= date('g'); ?>
<?php $time= $hour-5 ?>
Bold is the hour - $time takes the hour and subtracts 5 hours - change this to what ever you need to to match your correct time.
this is the value used in a text field
value="<?php echo date('F') ?> <?php echo date('d') ?> <?php echo date('Y') ?> - <?php echo $time ?>:<?php echo date('i') ?> <?php echo date('a') ?>"
This will insert into a text field in this format (we use this to show when someone last updated a record).
November 24, 2020 - 3:24 pm
|