Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #bigben2localtime
- use Date::Manip;
- # Simply follow @big_ben_clock and this will replace the BONGS with a
- # localtime conversion of the tweet timestamp.
- # The BONGS wear a bit thin after a while and are only useful in GMT time zones.
- # @pr4wn
- sub date_format {
- my $date = shift;
- my $s;
- $s = substr( $date, 8, 8 ); # hh:mm:ss
- return( $s );
- }
- $handle = sub {
- my $ref = shift;
- if ($ref->{user}->{screen_name} eq 'big_ben_clock' ) {
- my $created_at = ParseDate($ref->{'created_at'});
- $ref->{text} = date_format($created_at);
- }
- &defaulthandle ( $ref );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement