CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Future Events Past Daylight Savings Time Change
Pages: [1]

Author Topic: Future Events Past Daylight Savings Time Change  (Read 1018 times)

lespyd

  • Guest
Future Events Past Daylight Savings Time Change
July 31, 2010, 03: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: [Select]
<?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?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Future Events Past Daylight Savings Time Change
July 31, 2010, 08:25:57 pm

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

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

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Future Events Past Daylight Savings Time Change

This forum was archived on 2017-11-26.