ActiveSupport:::TimeWithZone contains a date/time value as UTC, but how to change it to a date/time based on Korea

Asked 2 years ago, Updated 2 years ago, 100 views

The variable contains the date/time value as UTC in ActiveSupport::TimeWithZone, but I want to change it to the date/time based on Korea.

ruby-on-rails time

2022-09-22 16:45

1 Answers

When the variable is named deu_date

due_date.in_time_zone("Seoul")

You can do it.


2022-09-22 16:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.