{
    "content": [
        {
            "type": "text",
            "text": "# BSON::Time (perldoc)\n\n## NAME\n\nBSON::Time - BSON type wrapper for date and time\n\n## SYNOPSIS\n\nuse BSON::Types ':all';\nbsontime();        # now\nbsontime( $secs ); # floating point seconds since epoch\n\n## DESCRIPTION\n\nThis module provides a BSON type wrapper for a 64-bit date-time value in the form of\nmilliseconds since the Unix epoch (UTC only).\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **ATTRIBUTES**\n- **METHODS**\n- **OVERLOADING**\n- **AUTHORS**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "BSON::Time",
        "section": "",
        "mode": "perldoc",
        "summary": "BSON::Time - BSON type wrapper for date and time",
        "synopsis": "use BSON::Types ':all';\nbsontime();        # now\nbsontime( $secs ); # floating point seconds since epoch",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "ATTRIBUTES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 40,
                "subsections": []
            },
            {
                "name": "OVERLOADING",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "BSON::Time - BSON type wrapper for date and time\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version v1.12.2\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use BSON::Types ':all';\n\nbsontime();        # now\nbsontime( $secs ); # floating point seconds since epoch\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module provides a BSON type wrapper for a 64-bit date-time value in the form of\nmilliseconds since the Unix epoch (UTC only).\n\nOn a Perl without 64-bit integer support, the value must be a Math::BigInt object.\n",
                "subsections": []
            },
            "ATTRIBUTES": {
                "content": "value\nA integer representing milliseconds since the Unix epoch. The default is 0.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "epoch\nReturns the number of seconds since the epoch (i.e. a floating-point value).\n\nasiso8601\nReturns the \"value\" as an ISO-8601 formatted string of the form \"YYYY-MM-DDThh:mm:ss.sssZ\". The\nfractional seconds will be omitted if they are zero.\n\nasdatetime\nLoads DateTime and returns the \"value\" as a DateTime object.\n\nasdatetimetiny\nLoads DateTime::Tiny and returns the \"value\" as a DateTime::Tiny object.\n\nasmangotime\nLoads Mango::BSON::Time and returns the \"value\" as a Mango::BSON::Time object.\n\nastimemoment\nLoads Time::Moment and returns the \"value\" as a Time::Moment object.\n\nTOJSON\nReturns a string formatted by \"asiso8601\".\n\nIf the \"BSONEXTJSON\" option is true, it will instead be compatible with MongoDB's extended JSON\n<https://github.com/mongodb/specifications/blob/master/source/extended-json.rst> format, which\nrepresents it as a document as follows:\n\nIf the \"BSONEXTJSON\" environment variable is true and the \"BSONEXTJSONRELAXED\" environment\nvariable is false, returns a hashref compatible with MongoDB's extended JSON\n<https://github.com/mongodb/specifications/blob/master/source/extended-json.rst> format, which\nrepresents it as a document as follows:\n\n{\"$date\" : { \"$numberLong\": \"22337203685477580\" } }\n\nIf the \"BSONEXTJSON\" and \"BSONEXTJSONRELAXED\" environment variables are both true, then it\nwill return a hashref with an ISO-8601 string for dates after the Unix epoch and before the year\n10,000 and a $numberLong style value otherwise.\n\n{\"$date\" : \"2012-12-24T12:15:30.500Z\"}\n{\"$date\" : { \"$numberLong\": \"-10000000\" } }\n",
                "subsections": []
            },
            "OVERLOADING": {
                "content": "Both numification (\"0+\") and stringification (\"\") are overloaded to return the result of\n\"epoch\". Numeric comparison and string comparison are overloaded based on those and fallback\noverloading is enabled.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "*   David Golden <david@mongodb.com>\n\n*   Stefan G. <minimalist@lavabit.com>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is Copyright (c) 2020 by Stefan G. and MongoDB, Inc.\n\nThis is free software, licensed under:\n\nThe Apache License, Version 2.0, January 2004\n",
                "subsections": []
            }
        }
    }
}