Fix date format in show page.
This commit is contained in:
parent
53c5d91035
commit
ebf1ed5fa3
|
@ -263,7 +263,7 @@ class AnnouncementsController < ApplicationController
|
||||||
"title" => announcement.title,
|
"title" => announcement.title,
|
||||||
"subtitle_ann" => subtitle_ann,
|
"subtitle_ann" => subtitle_ann,
|
||||||
"update_user" => update_user,
|
"update_user" => update_user,
|
||||||
"updated_at" => announcement.postdate.strftime('%Y-%m-%d %H:%M'),
|
"updated_at" => announcement.postdate.in_time_zone(Time.zone.utc_offset / 3600).strftime('%Y-%m-%d %H:%M'),
|
||||||
"body" =>announcement.text,
|
"body" =>announcement.text,
|
||||||
"image" => announcement.image.url,
|
"image" => announcement.image.url,
|
||||||
"img_src" => img_src,
|
"img_src" => img_src,
|
||||||
|
@ -334,7 +334,7 @@ class AnnouncementsController < ApplicationController
|
||||||
"title" => announcement["title_translations"][locale],
|
"title" => announcement["title_translations"][locale],
|
||||||
"subtitle_ann" => subtitle_ann,
|
"subtitle_ann" => subtitle_ann,
|
||||||
"update_user" => update_user,
|
"update_user" => update_user,
|
||||||
"updated_at" => datetime.strftime('%Y-%m-%d %H:%M'),
|
"updated_at" => datetime.in_time_zone(Time.zone.utc_offset / 3600).strftime('%Y-%m-%d %H:%M'),
|
||||||
"body" => announcement["text_translations"][locale],
|
"body" => announcement["text_translations"][locale],
|
||||||
"image" => announcement["image"]["original"],
|
"image" => announcement["image"]["original"],
|
||||||
"img_src" => img_src,
|
"img_src" => img_src,
|
||||||
|
|
Loading…
Reference in New Issue