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

Asked 1 years ago, Updated 1 years ago, 88 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.