mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-30 03:24:47 +00:00
feed.php: migrate from no-locale-supporting DateTime->format() -> strftime()
This commit is contained in:
parent
904f3069ab
commit
2b19868bf3
@ -126,14 +126,14 @@ function caldav_get_feed( $request ) {
|
||||
$dt_start = $event_data[0]->GetProperty('DTSTART');
|
||||
if ( $dt_start != null ) {
|
||||
$dt_start = new RepeatRuleDateTime($dt_start);
|
||||
$p_time = '<strong>' . translate('Time') . ':</strong> ' . $dt_start->format(translate('Y-m-d H:i:s'));
|
||||
$p_time = '<strong>' . translate('Time') . ':</strong> ' . strftime(translate('%F %T'), $dt_start->epoch());
|
||||
|
||||
$dt_end = $event_data[0]->GetProperty('DTEND');
|
||||
if ( $dt_end != null ) {
|
||||
$dt_end = new RepeatRuleDateTime($dt_end);
|
||||
$p_time .= ' - ' . ( $dt_end->AsDate() == $dt_start->AsDate()
|
||||
? $dt_end->format(translate('H:i:s'))
|
||||
: $dt_end->format(translate('Y-m-d H:i:s'))
|
||||
? strftime(translate('%T'), $dt_end->epoch())
|
||||
: strftime(translate('%F %T'), $dt_end->epoch())
|
||||
);
|
||||
}
|
||||
$content .= $p_time;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user