Windows NT KAMIDAKI 10.0 build 19045 (Windows 10) AMD64
Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.3.9
Server IP : 192.168.3.16 & Your IP : 216.73.216.204
Domains :
Cant Read [ /etc/named.conf ]
User : SISTEMA
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
C: /
xampp /
perl /
vendor /
lib /
Mojo /
Delete
Unzip
Name
Size
Permission
Date
Action
Asset
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
Content
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
Cookie
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
DOM
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
IOLoop
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
JSON
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
Message
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
Reactor
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
Server
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
Transaction
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
UserAgent
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
resources
[ DIR ]
drwxrwxrwx
2024-07-26 17:40
Asset.pm
3.12
KB
-rw-rw-rw-
2021-01-17 16:57
Base.pm
11.48
KB
-rw-rw-rw-
2021-01-17 16:57
ByteStream.pm
8.23
KB
-rw-rw-rw-
2021-01-17 16:57
Cache.pm
1.3
KB
-rw-rw-rw-
2021-01-17 16:57
Collection.pm
10.13
KB
-rw-rw-rw-
2021-01-17 16:57
Content.pm
14.51
KB
-rw-rw-rw-
2021-01-17 16:57
Cookie.pm
1.56
KB
-rw-rw-rw-
2021-01-17 16:57
DOM.pm
30.11
KB
-rw-rw-rw-
2021-01-17 16:57
Date.pm
4.46
KB
-rw-rw-rw-
2021-01-17 16:57
DynamicMethods.pm
2.92
KB
-rw-rw-rw-
2021-01-17 16:57
EventEmitter.pm
3.38
KB
-rw-rw-rw-
2021-01-17 16:57
Exception.pm
10.03
KB
-rw-rw-rw-
2021-01-17 16:57
File.pm
12.88
KB
-rw-rw-rw-
2021-01-17 16:57
Headers.pm
19.2
KB
-rw-rw-rw-
2021-01-17 16:57
HelloWorld.pm
883
B
-rw-rw-rw-
2021-01-17 16:57
Home.pm
1.64
KB
-rw-rw-rw-
2021-01-17 16:57
IOLoop.pm
17.77
KB
-rw-rw-rw-
2021-01-17 16:57
JSON.pm
8.95
KB
-rw-rw-rw-
2021-01-17 16:57
Loader.pm
5.09
KB
-rw-rw-rw-
2021-01-17 16:57
Log.pm
6.72
KB
-rw-rw-rw-
2021-01-17 16:57
Message.pm
17.13
KB
-rw-rw-rw-
2021-01-17 16:57
Parameters.pm
8.75
KB
-rw-rw-rw-
2021-01-17 16:57
Path.pm
7.92
KB
-rw-rw-rw-
2021-01-17 16:57
Promise.pm
14.81
KB
-rw-rw-rw-
2021-01-17 16:57
Reactor.pm
5.6
KB
-rw-rw-rw-
2021-01-17 16:57
Server.pm
4.37
KB
-rw-rw-rw-
2021-01-17 16:57
Template.pm
17.8
KB
-rw-rw-rw-
2021-01-17 16:57
Transaction.pm
6.85
KB
-rw-rw-rw-
2021-01-17 16:57
URL.pm
12.53
KB
-rw-rw-rw-
2021-01-17 16:57
Upload.pm
1.57
KB
-rw-rw-rw-
2021-01-17 16:57
UserAgent.pm
34.04
KB
-rw-rw-rw-
2021-01-17 16:57
Util.pm
22.59
KB
-rw-rw-rw-
2021-01-17 16:57
WebSocket.pm
7.1
KB
-rw-rw-rw-
2021-01-17 16:57
Save
Rename
package Mojo::Date; use Mojo::Base -base; use overload bool => sub {1}, '""' => sub { shift->to_string }, fallback => 1; use Time::Local qw(timegm); has epoch => sub {time}; my $RFC3339_RE = qr/ ^(\d+)-(\d+)-(\d+)\D+(\d+):(\d+):(\d+(?:\.\d+)?) # Date and time (?:Z|([+-])(\d+):(\d+))?$ # Offset /xi; my @DAYS = qw(Sun Mon Tue Wed Thu Fri Sat); my @MONTHS = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); my %MONTHS; @MONTHS{@MONTHS} = (0 .. 11); sub new { @_ > 1 ? shift->SUPER::new->parse(@_) : shift->SUPER::new } sub parse { my ($self, $date) = @_; # epoch (784111777) return $self->epoch($date) if $date =~ /^\d+$|^\d+\.\d+$/; # RFC 822/1123 (Sun, 06 Nov 1994 08:49:37 GMT) # RFC 850/1036 (Sunday, 06-Nov-94 08:49:37 GMT) my $offset = 0; my ($day, $month, $year, $h, $m, $s); if ($date =~ /^\w+\W+(\d+)\W+(\w+)\W+(\d+)\W+(\d+):(\d+):(\d+)\W*\w+$/) { ($day, $month, $year, $h, $m, $s) = ($1, $MONTHS{$2}, $3, $4, $5, $6); } # RFC 3339 (1994-11-06T08:49:37Z) elsif ($date =~ $RFC3339_RE) { ($year, $month, $day, $h, $m, $s) = ($1, $2 - 1, $3, $4, $5, $6); $offset = (($8 * 3600) + ($9 * 60)) * ($7 eq '+' ? -1 : 1) if $7; } # ANSI C asctime() (Sun Nov 6 08:49:37 1994) elsif ($date =~ /^\w+\s+(\w+)\s+(\d+)\s+(\d+):(\d+):(\d+)\s+(\d+)$/) { ($month, $day, $h, $m, $s, $year) = ($MONTHS{$1}, $2, $3, $4, $5, $6); } # Invalid else { return $self->epoch(undef) } my $epoch = eval { timegm $s, $m, $h, $day, $month, $year }; return $self->epoch((defined $epoch && ($epoch += $offset) >= 0) ? $epoch : undef); } sub to_datetime { # RFC 3339 (1994-11-06T08:49:37Z) my ($s, $m, $h, $day, $month, $year) = gmtime(my $epoch = shift->epoch); my $str = sprintf '%04d-%02d-%02dT%02d:%02d:%02d', $year + 1900, $month + 1, $day, $h, $m, $s; return $str . ($epoch =~ /(\.\d+)$/ ? $1 : '') . 'Z'; } sub to_string { # RFC 7231 (Sun, 06 Nov 1994 08:49:37 GMT) my ($s, $m, $h, $mday, $month, $year, $wday) = gmtime shift->epoch; return sprintf '%s, %02d %s %04d %02d:%02d:%02d GMT', $DAYS[$wday], $mday, $MONTHS[$month], $year + 1900, $h, $m, $s; } 1; =encoding utf8 =head1 NAME Mojo::Date - HTTP date =head1 SYNOPSIS use Mojo::Date; # Parse my $date = Mojo::Date->new('Sun, 06 Nov 1994 08:49:37 GMT'); say $date->epoch; # Build my $date = Mojo::Date->new(time + 60); say "$date"; =head1 DESCRIPTION L<Mojo::Date> implements HTTP date and time functions, based on L<RFC 7230|https://tools.ietf.org/html/rfc7230>, L<RFC 7231|https://tools.ietf.org/html/rfc7231> and L<RFC 3339|https://tools.ietf.org/html/rfc3339>. =head1 ATTRIBUTES L<Mojo::Date> implements the following attributes. =head2 epoch my $epoch = $date->epoch; $date = $date->epoch(784111777); Epoch seconds, defaults to the current time. =head1 METHODS L<Mojo::Date> inherits all methods from L<Mojo::Base> and implements the following new ones. =head2 new my $date = Mojo::Date->new; my $date = Mojo::Date->new('Sun Nov 6 08:49:37 1994'); Construct a new L<Mojo::Date> object and L</"parse"> date if necessary. =head2 parse $date = $date->parse('Sun Nov 6 08:49:37 1994'); Parse date. # Epoch say Mojo::Date->new('784111777')->epoch; say Mojo::Date->new('784111777.21')->epoch; # RFC 822/1123 say Mojo::Date->new('Sun, 06 Nov 1994 08:49:37 GMT')->epoch; # RFC 850/1036 say Mojo::Date->new('Sunday, 06-Nov-94 08:49:37 GMT')->epoch; # Ansi C asctime() say Mojo::Date->new('Sun Nov 6 08:49:37 1994')->epoch; # RFC 3339 say Mojo::Date->new('1994-11-06T08:49:37Z')->epoch; say Mojo::Date->new('1994-11-06T08:49:37')->epoch; say Mojo::Date->new('1994-11-06T08:49:37.21Z')->epoch; say Mojo::Date->new('1994-11-06T08:49:37+01:00')->epoch; say Mojo::Date->new('1994-11-06T08:49:37-01:00')->epoch; =head2 to_datetime my $str = $date->to_datetime; Render L<RFC 3339|https://tools.ietf.org/html/rfc3339> date and time. # "1994-11-06T08:49:37Z" Mojo::Date->new(784111777)->to_datetime; # "1994-11-06T08:49:37.21Z" Mojo::Date->new(784111777.21)->to_datetime; =head2 to_string my $str = $date->to_string; Render date suitable for HTTP messages. # "Sun, 06 Nov 1994 08:49:37 GMT" Mojo::Date->new(784111777)->to_string; =head1 OPERATORS L<Mojo::Date> overloads the following operators. =head2 bool my $bool = !!$date; Always true. =head2 stringify my $str = "$date"; Alias for L</"to_string">. =head1 SEE ALSO L<Mojolicious>, L<Mojolicious::Guides>, L<https://mojolicious.org>. =cut