class X::DateTime::TimezoneClash

Error due to using both timezone offset and :timezone
class X::DateTime::TimezoneClash does X::Temporal is Exception { }

This exception is thrown when code tries to create a DateTime object specifying both a timezone offset and the named argument :timezone.

say DateTime.new('2015-12-24T12:23:00+0200');                   # works
say DateTime.new('2015-12-24T12:23:00', timezone => 7200);      # works
say DateTime.new('2015-12-24T12:23:00+0200', timezone => 7200); # exception

Methods

method message

method message()

Returns 'DateTime.new(Str): :timezone argument not allowed with a timestamp offset'

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite β€” the markup and publishing tools behind this site.