summaryrefslogtreecommitdiffstats
path: root/includes/giglogadmin-export-ical-handler.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/giglogadmin-export-ical-handler.php')
-rw-r--r--includes/giglogadmin-export-ical-handler.php11
1 files changed, 2 insertions, 9 deletions
diff --git a/includes/giglogadmin-export-ical-handler.php b/includes/giglogadmin-export-ical-handler.php
index 44afbea..c230638 100644
--- a/includes/giglogadmin-export-ical-handler.php
+++ b/includes/giglogadmin-export-ical-handler.php
@@ -30,11 +30,9 @@ if ( ! function_exists( 'giglogadmin_export_ical_handler' ) ) {
$cfullname = $concert->cname() . ' live at ' . $concert->venue()->name() . ', ' . $concert->venue()->city();
$cshortname = substr( $cfullname, 0, 20 );
- $fdate = strtotime( $concert->cdate() );
- $newformat = date( 'Ymd', $fdate );
$filename = sanitize_file_name(
- "Concert-{$concert->venue()->name()}-{$newformat}-"
+ "Concert-{$concert->venue()->name()}-{$concert->cdate()->format( 'Ymd' )}-"
. substr( $concert->cname(), 0, 30 )
);
@@ -58,12 +56,7 @@ if ( ! function_exists( 'giglogadmin_export_ical_handler' ) ) {
// place the event
->setLocation( "{$concert->venue()->name()}, {$concert->venue()->city()}" )
// set the time
- ->setDtstart(
- new DateTime(
- $newformat . 'T190000',
- new DateTimezone( 'Europe/Oslo' )
- )
- )
+ ->setDtstart( $concert->cdate() )
->setDuration( 'PT4H' );
header( 'Content-Type: text/calendar' );