MongoDB Inc > BSON > BSON::Time

Download:
BSON-0.12.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.12   Source   Latest Release: BSON-0.15-TRIAL

NAME ^

BSON::Time - Date and time data for BSON

VERSION ^

version 0.12

SYNOPSIS ^

    use BSON;

    my $dt = BSON::Time->new( $epoch );

DESCRIPTION ^

This module is needed for BSON and it manages BSON's date element.

METHODS ^

new

Object constructor. Optional parameter specifies an epoch date. If no parameters are passed it will use the current time.

    my $t = BSON::Time->new;    # Time now
    my $d = BSON::Time->new(123456789);

value

Returns the stored time in milliseconds since the Epoch. To convert to seconds, divide by 1000.

epoch

Returns the stored time in seconds since the Epoch.

SEE ALSO ^

BSON

AUTHORS ^

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2015 by minimalist and MongoDB, Inc..

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004
syntax highlighting: