function localdate($format, $timestamp)
{
global $settings;
return strftime($format, $timestamp + fusion_get_settings('timeoffset')*3600);
}
fusion_get_settings('timeoffset') == Europe/Belgrade
return strftime($format, $timestamp);
fusion_get_settings('timeoffset')
is string.This is the original function
// Utility function to return a formatted local date
function localdate($format, $timestamp)
{
global $settings;
return strftime($format, $timestamp + $settings['timeoffset']*3600);
}
This my modified function
// Utility function to return a formatted local date
function localdate($format, $timestamp)
{
global $settings;
$format = showdate($settings['shortdate'], TIME, ['tz_override' => $settings['timeoffset']]);
return strftime($format, $timestamp);
}
These are the 3 localdate calls in the script with locale define for strftime
Locale that defines strftime
$locale['AN010'] = '%a, %b %e at %H:%M'; // Date-format used for strftime(...)
$locale['AN011'] = '%e %b %H:%M'; // Short date-format used for strftime(...) in autonews_panel only
<td>".localdate($locale['AN010'], $date)."</td>
localdate($locale['AN010'], $data['timestamp']),
".localdate($locale['AN010'], $autonews_settings['ts_thissend'])."
$locale['AN010'] = '%a, %b %e at %H:%M'; // Date-format used for strftime(...)
$locale['AN011'] = '%e %b %H:%M'; // Short date-format used for strftime(...) in autonews_panel only
<td>".showdate($locale['AN010'], $date)."</td>
showdate($locale['AN010'], $data['timestamp']),
".showdate($locale['AN010'], $autonews_settings['ts_thissend'])."
function localdate($format, $timestamp) {
return showdate($format, $timestamp);
}
Category Forum
Code Snippet and functions - 9Labels
None yet
Statistics
3 participants
Notifications
You are not receiving notifications from this thread.
Related Questions