… | |
… | |
64 | |
64 | |
65 | package CBOR::XS; |
65 | package CBOR::XS; |
66 | |
66 | |
67 | use common::sense; |
67 | use common::sense; |
68 | |
68 | |
69 | our $VERSION = 1.11; |
69 | our $VERSION = 1.12; |
70 | our @ISA = qw(Exporter); |
70 | our @ISA = qw(Exporter); |
71 | |
71 | |
72 | our @EXPORT = qw(encode_cbor decode_cbor); |
72 | our @EXPORT = qw(encode_cbor decode_cbor); |
73 | |
73 | |
74 | use Exporter; |
74 | use Exporter; |
… | |
… | |
989 | # from FreeBSD, which can't parse ISO 8601, RFC3339, RFC4287 or much of anything |
989 | # from FreeBSD, which can't parse ISO 8601, RFC3339, RFC4287 or much of anything |
990 | # else either. Whats incredibe over standard strptime totally escapes me. |
990 | # else either. Whats incredibe over standard strptime totally escapes me. |
991 | # doesn't do fractional times, either. sigh. |
991 | # doesn't do fractional times, either. sigh. |
992 | # In fact, it's all a lie, it uses whatever strptime it wants, and of course, |
992 | # In fact, it's all a lie, it uses whatever strptime it wants, and of course, |
993 | # they are all incomptible. The openbsd one simply ignores %z (but according to the |
993 | # they are all incomptible. The openbsd one simply ignores %z (but according to the |
994 | # docs, it would be much more incredibly flexible). |
994 | # docs, it would be much more incredibly flexible indeed. If it worked, that is.). |
995 | scalar eval { |
995 | scalar eval { |
996 | my $s = $_[1]; |
996 | my $s = $_[1]; |
997 | |
997 | |
998 | $s =~ s/Z$/+00:00/; |
998 | $s =~ s/Z$/+00:00/; |
999 | $s =~ s/(\.[0-9]+)?([+-][0-9][0-9]):([0-9][0-9])$// |
999 | $s =~ s/(\.[0-9]+)?([+-][0-9][0-9]):([0-9][0-9])$// |