Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to display timestamp without timezone

@object.updated_at.localtime displays "2015-04-20 14:39:27 -0700". I don't want to display the -0700, is there a method that will strip out the timezone for display purposes?

like image 212
Tim Koelkebeck Avatar asked Nov 01 '25 05:11

Tim Koelkebeck


1 Answers

@object.updated_at.localtime.strftime '%Y-%m-%d %H:%M:%S'
like image 80
makhan Avatar answered Nov 03 '25 22:11

makhan