• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
date time error

#1
[eluser]Unknown[/eluser]
hello i have a problem with date & time when i add events,
1) when i select date and time from admin panel like 2012/06/26 22:00 when i click send querry. as output in admin panel show 10:00 AM 2012 06 27 (next day morring date time) so my events dont remove automatic,
Code:
FILE : Add.php
Start Time :
&lt;input name="event_start" value="&lt;?php print date("Y-m-d H:i:s"); ?&gt;"&gt; <br>
End Time:
&lt;input name="event_end" value="&lt;?php print extendTime(date("Y-m-d H:i:s"), 2); ?&gt;" id="event_end"&gt;
FILE : list.php
list.php
<td>".getTime($event->event_start)." $start_gap </td>
    <td>".getTime($event->event_end)." $end_gap </td>

#2
[eluser]InsiteFX[/eluser]
You can try setting the timezone to your timezone.
Code:
// Backup timezone and set to GMT
$timezone_backup = date_default_timezone_get();
date_default_timezone_set("GMT");  // Examples: UTC, GMT, Atlantic/Azores

More here:
PHP Date

In CI you can set it to gmt time in the ./application/config/config.php file.

#3
[eluser]Unknown[/eluser]
Code:
strtotime(date("Y-m-d H:i:s"));
controllers folder evnt.php

in this format if i added 17:00 in admin panel as out put show me 5:00 am
if i add 5:00 curtime show 17:00 how to fix please help

#4
[eluser]InsiteFX[/eluser]
PHP date


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.