mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
quick fix for timezone settings
This commit is contained in:
parent
c6b1c6daee
commit
2aa0a453e1
30
calendar/q_fix.php
Executable file
30
calendar/q_fix.php
Executable file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Calendar *
|
||||
* http://www.phpgroupware.org *
|
||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||
* http://www.radix.net/~cknudsen *
|
||||
* -------------------------------------------- *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU General Public License as published by the *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_calendar_class" => True);
|
||||
|
||||
include("../header.inc.php");
|
||||
|
||||
$db2 = $phpgw->db;
|
||||
|
||||
$phpgw->db->query("SELECT datetime, mdatetime, cal_id FROM calendar_entry ORDER BY cal_id",__LINE__,__FILE__);
|
||||
if($phpgw-db->num_rows()) {
|
||||
while($phpgw->db-next_record()) {
|
||||
$datetime = $phpgw->db->f("datetime") - ((60*60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"]);
|
||||
$mdatetime = $phpgw->db->f("mdatetime") - ((60*60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"]);
|
||||
$db2->query("UPDATE calendar_entry SET datetime=".$datetime.", mdatetime=".$mdatetime." WHERE cal_id=".$phpgw->db->f("cal_id"),__LINE__,__FILE__);
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user