CiviCRM Forums
News: You can learn more about CiviCRM from our new free book: Understanding CiviCRM. Also Check the CiviCRM Blog for updated information on CiviCRM
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 02, 2010, 08:24:11 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Future Events Past Daylight Savings Time Change  (Read 88 times)
lespyd
I’m new here
*

Karma: 0
Offline Offline

CiviCRM: 3.2
CMS: Drupal
MySQL: Latest
PHP: 5.2

Posts: 1


View Profile
« on: July 31, 2010, 02:41:31 pm »

Hi everyone,

First, I just starting using CiviCRM and I think it's great and thanks to the team for creating such an awesome tool.

Now the problem I'm having is that I'm creating events in the far future, past the November Daylight savings time change. In CiviCRM, the times remain the same, but on my frontpage, the events after the first sunday of November are 1 hour early. (I'm using a Views2 to display an event list on the frontpage). That being said, here's my views template file, displaying the incorrect time.

Code:
<?php 
$unixtimetstart 
=$row->civicrm_event_start_date;
$unixtimetend =$row->civicrm_event_end_date;
$realtimetstart =date("g:ia"$unixtimetstart);
$realtimetend =date("g:ia"$unixtimetend);

if(empty(
$unixtimetend))
print 
"$realtimetstart";
else
print 
"$realtimetstart &ndash; $realtimetend";
?>

From what I gather, CiviEvent stores the times in unix time, so for themeing purposes, I converted the raw SQL data to real time. When I create the actual event in the civicrm admin, I choose 11/4/10 4:00pm from the form. When I go to the actual civicrm event page, the time is correct. It's only when I grab the raw sql data and convert it to real time that throws it off an hour. This doesn't happen to events before November. Any thoughts? Am I not supposed to grab the raw data?
Logged
Donald Lobo
Administrator
I’m (like) Lobo ;)
*****

Karma: 330
Offline Offline

CiviCRM: 3.2
CMS: Drupal 6.x, Joomla 1.5.x
MySQL: MySQL 5.1.x
PHP: PHP 5.3.x

Posts: 9357



View Profile WWW
« Reply #1 on: July 31, 2010, 07:25:57 pm »


civicrm stores the time in the DB format and not unix time

not sure if the above helps u or not Smiley maybe the views2 code does some DST manipulation?

lobo
Logged

Use CiviCRM? Like CiviCRM? Then show your appreciation and make a donation.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM