We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06e5ec2 commit 9752f1cCopy full SHA for 9752f1c
lib/elixir/lib/calendar/datetime.ex
@@ -525,6 +525,24 @@ defmodule DateTime do
525
not calendar.valid_time?(hour, minute, second, microsecond) ->
526
{:error, :invalid_time}
527
528
+ offset == 0 ->
529
+ datetime = %DateTime{
530
+ calendar: calendar,
531
+ year: year,
532
+ month: month,
533
+ day: day,
534
+ hour: hour,
535
+ minute: minute,
536
+ second: second,
537
+ microsecond: microsecond,
538
+ std_offset: 0,
539
+ utc_offset: 0,
540
+ zone_abbr: "UTC",
541
+ time_zone: "Etc/UTC"
542
+ }
543
+
544
+ {:ok, datetime, 0}
545
546
is_nil(offset) ->
547
{:error, :missing_offset}
548
0 commit comments