1DateTime::Format::IBeatU(s3e)r Contributed Perl DocumentaDtaitoenTime::Format::IBeat(3)
2
3
4

NAME

6       DateTime::Format::IBeat - Format times in .beat notation
7

DESCRIPTION

9           No Time Zones
10
11           No Geographical Borders
12
13           How long is a Swatch .beat? In short, we have divided up the virtual and
14           real day into 1000 I<beats>. One Swatch beat is the equivalent of 1
15           minute 26.4 seconds. That means that 12 noon in the old time system is
16           the equivalent of @500 Swatch .beats.
17
18           Okay, so how can a surfer in New York, or a passenger on a transatlantic
19           flight know when it is @500 Swatch .beats in Central Europe for example?
20           How can the New York surfer make a date for a chat with his cyber friend
21           in Rome? Easy, Internet Time is the same all over the world.
22
23           How is this possible? We are not just creating a new way of measuring
24           time, we are also creating a new meridian in Biel, Switzerland, home of
25           Swatch.
26
27           Biel MeanTime (BMT) is the universal reference for Internet Time. A day
28           in Internet Time begins at midnight BMT (@000 Swatch .beats) (Central
29           European Wintertime). The meridian is marked for all to see on the
30           facade of the Swatch International Headquarters on Jakob-Staempfli
31           Street, Biel, Switzerland. So, it is the same time all over the world,
32           be it night or day, the era of time zones has disappeared.
33
34           The BMT meridian was inaugurated on 23 October 1998 in the presence of
35           Nicholas Negroponte, founder and director of the Massachusetts Institute
36           of Technology`s Media Laboratory.
37
38           - http://www.swatch.com/itime_tools/itime.php
39

PARSING METHODS

41   parse_time
42       Parses a .beat time and returns a DateTime object.  The object uses the
43       current date for its date and will have UTC set as its timezone. Feel
44       free to use 'set' to convert to your local time.
45
46           my $first = DateTime::Format::IBeat->parse_time( '@765' );
47           print $first->datetime; # 2003-04-01T17:21:36
48
49           $first->set_time_zone( "Australia/Sydney" );
50           print $first->datetime; # 2003-04-02T03:21:36
51
52       Note that the leading @ is optional. Also, if using direct strings, and
53       leading @s, be careful to not have it interpolate it as an array by
54       accident.
55
56   parse_date
57       Parses an .beat date and returns a "DateTime" object representing that
58       date.
59
60            my $dt = DateTime::Format::IBeat->parse_date('@d01.04.03');
61            print $dt->ymd('.'); # "2003.04.01"
62
63       Note: this assumes the number of .beats elapsed in the day to be 0,
64       thus it will appear to be returning the day before. If you display a
65       full time with it, you will find it's at UTC rather than BMT (+0100),
66       thus 11pm the day before. The important thing to remember is that it is
67       an accurate conversion to the usual notation, despite appearances.
68
69   parse_datetime
70       Parses an ibeat datetime string and returns a "DateTime" object
71       representing that datetime.
72
73           my $dt = DateTime::Format::IBeat->parse_datetime(
74               '@d01.04.03 @765');
75           print $dt->datetime; # "2003-04-01T17:21:36"
76

FORMATTING METHODS

78   format_time
79       Given a DateTime object, returns a string representating that time in
80       ibeats.
81
82   format_date
83       Given a DateTime object, returns a string representating that date.
84
85   format_datetime
86       Given a Datetime object, returns a string representating that date and
87       time in .beats format.
88

THANKS

90       The original author of this module was Iain Truskett (SPOON). Since his
91       tragically early death, the module has been maintained by Earle Martin
92       (EMARTIN), who would like to dedicate it to his memory.
93
94       Iain wished to thank:
95
96       ·   Dave Rolsky (DROLSKY) for kickstarting the DateTime project.
97
98       ·   Swatch, for coming up with this mad format.
99
100       ·   Jerub, from opn, who wrote the python original, from which I retain
101           no code. D'oh.
102
103       Here is a list of people and their CPAN id, extracted from various
104       places.  These people have either submitted patches or suggestions, or
105       their bug reports or comments have inspired the appropriate patches.
106       Corrections, additions, deletions welcome:
107
108       ·   Dave Rolsky (DROLSKY)
109

SUPPORT

111       You can log bug reports via the CPAN RT system on the web:
112
113           http://rt.cpan.org/
114
115       This makes it much easier for me to track things and thus means your
116       problem is less likely to be neglected.
117
119       Copyright (c) Iain Truskett, 2003. All rights reserved.
120
121       This library is free software; you can redistribute it and/or modify it
122       under the same terms as Perl itself.
123
124       The full text of the licences can be found in the Artistic and COPYING
125       files included with this module.
126

AUTHOR

128       The late Iain Truskett (SPOON) created this module. It is currently
129       maintained by Earle Martin (EMARTIN), who would like to dedicate it to
130       his memory.
131

SEE ALSO

133       ·   DateTime
134
135       ·   The "datetime@perl.org" mailing list
136
137       ·   <http://datetime.perl.org/>
138
139
140
141perl v5.30.1                      2020-01-29        DateTime::Format::IBeat(3)
Impressum