summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2007-02-27 17:33:02 +0000
committerLester Caine <lester@lsces.co.uk>2007-02-27 17:33:02 +0000
commitc55c46f9a8635228cf0ed9cb2aa8e7c1ea19846b (patch)
treecf7a20be83d5b7257c27f87ce4465228c589e8d5 /index.php
parent54eda65c27ddd0f5e3b9a35e855fce75f40b9a6a (diff)
downloadcalendar-c55c46f9a8635228cf0ed9cb2aa8e7c1ea19846b.tar.gz
calendar-c55c46f9a8635228cf0ed9cb2aa8e7c1ea19846b.tar.bz2
calendar-c55c46f9a8635228cf0ed9cb2aa8e7c1ea19846b.zip
Strip all reliance on server side time offset so that calendar is fixed UTC display, and content can be aligned as required from the display offset.
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/index.php b/index.php
index 9f7a5ae..64250c3 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.44 2006/06/16 16:10:27 hash9 Exp $
+// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.45 2007/02/27 17:33:02 lsces Exp $
// Copyright( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
@@ -38,11 +38,11 @@ $gCalendar = new Calendar();
// set up the todate
if( !empty( $_REQUEST["todate"] ) ) {
- // clean up todate. who knows where this has come from
+// clean up todate. who knows where this has come from
if ( is_numeric( $_REQUEST['todate'] ) ) {
- $_SESSION['calendar']['focus_date'] = $_REQUEST['todate'] = $gCalendar->mDate->gmmktime( 0, 0, 0, $gCalendar->mDate->date( 'm', $_REQUEST['todate'] ), $gCalendar->mDate->date( 'd', $_REQUEST['todate'] ), $gCalendar->mDate->date( 'Y', $_REQUEST['todate'] ) );
+ $_SESSION['calendar']['focus_date'] = $_REQUEST['todate'] = $gCalendar->mDate->gmmktime( 0, 0, 0, $gCalendar->mDate->date( 'm', $_REQUEST['todate'], true ), $gCalendar->mDate->date( 'd', $_REQUEST['todate'], true ), $gCalendar->mDate->date( 'Y', $_REQUEST['todate'], true ) );
} else {
- $_SESSION['calendar']['focus_date'] = $_REQUEST['todate'] = $gCalendar->mDate->gmmktime( 0, 0, 0, $gCalendar->mDate->date2( 'm', $_REQUEST['todate'] ), $gCalendar->mDate->date2( 'd', $_REQUEST['todate'] ), $gCalendar->mDate->date2( 'Y', $_REQUEST['todate'] ) );
+ $_SESSION['calendar']['focus_date'] = $_REQUEST['todate'] = $gCalendar->mDate->gmmktime( 0, 0, 0, $gCalendar->mDate->date2( 'm', $_REQUEST['todate'], true ), $gCalendar->mDate->date2( 'd', $_REQUEST['todate'], true ), $gCalendar->mDate->date2( 'Y', $_REQUEST['todate'], true ) );
}
} elseif( !empty( $_SESSION['calendar']['focus_date'] ) ) {
$_REQUEST["todate"] = $_SESSION['calendar']['focus_date'];
@@ -52,7 +52,6 @@ if( !empty( $_REQUEST["todate"] ) ) {
}
$focus = $_REQUEST['todate'];
-
if( !empty( $_REQUEST["view_mode"] ) ) {
$_SESSION['calendar']['view_mode'] = $_REQUEST["view_mode"];
} elseif( empty( $_SESSION['calendar']['view_mode'] ) ) {
@@ -90,7 +89,7 @@ foreach( $calMonth as $w => $week ) {
foreach( $calDay as $key => $t ) {
// special case - last item entry in array - check this first
- if( $bitEvent['timestamp'] >= $calDay[$key]['time'] && empty( $calDay[$key + 1]['time'] ) ) {
+ if( $bitEvent['timestamp'] >= $calDay[$key]['time'] && empty( $calDay[$key + 1]['time'] ) ) {
$calDay[$key]['items'][] = $dayEvents[$i];
} elseif( $bitEvent['timestamp'] >= $calDay[$key]['time'] && $bitEvent['timestamp'] <= $calDay[$key + 1]['time'] ) {
$calDay[$key]['items'][] = $dayEvents[$i];