mirror of
https://github.com/typecho/typecho.git
synced 2025-03-19 17:39:42 +01:00
fix #1077
This commit is contained in:
parent
27ebdf09f0
commit
60fdcae8e5
@ -130,8 +130,9 @@ class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widg
|
||||
$created = $this->request->created;
|
||||
} else if (!empty($this->request->date)) {
|
||||
$dstOffset = !empty($this->request->dst) ? $this->request->dst : 0;
|
||||
$timezoneOffset = $this->options->timezone;
|
||||
$timezone = ($timezoneOffset >= 0 ? '+' : '-') . str_pad($timezoneOffset / 3600, 2, '0', STR_PAD_LEFT) . ':00';
|
||||
$timezoneSymbol = $this->options->timezone >= 0 ? '+' : '-';
|
||||
$timezoneOffset = abs($this->options->timezone);
|
||||
$timezone = $timezoneSymbol . str_pad($timezoneOffset / 3600, 2, '0', STR_PAD_LEFT) . ':00';
|
||||
list ($date, $time) = explode(' ', $this->request->date);
|
||||
|
||||
$created = strtotime("{$date}T{$time}{$timezone}") - $dstOffset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user