Skip to content

class_tiny_gsm_time

Sara Damiano edited this page Sep 11, 2026 · 2 revisions

title: TinyGsmTime

TinyGsmTime (class)

Module: TinyGsmTime

The CRTP parent class for time printing and retrieval functions.

#include <src/TinyGsmTime.tpp>

Time functions

Public Functions

Name
String getGSMDateTime(TinyGSMDateTimeFormat format)
Get the Date Time as a String.
bool getNetworkTime(int * year, int * month, int * day, int * hour, int * minute, int * second, float * timezone)
Get the date and time as parts.
bool getNetworkUTCTime(int * year, int * month, int * day, int * hour, int * minute, int * second, float * timezone)
Get the date and time as parts in UTC.
uint32_t getNetworkEpoch(TinyGSM_EpochStart epoch = TinyGSM_EpochStart::UNIX)
Get the Date/Time as an epoch value.

Public Functions Documentation

Time functions

functiongetGSMDateTime

String getGSMDateTime([TinyGSMDateTimeFormat](../files/_tiny_gsm_time_8tpp.md#a4d77a5e8d7107365e5ca6f8815ac5714) format)

functiongetNetworkTime

bool getNetworkTime(int * year, int * month, int * day, int * hour, int * minute, int * second, float * timezone)
  • Parameters:
    • year Reference to an int for the year
    • month Reference to an int for the month
    • day Reference to an int for the day
    • hour Reference to an int for the hour
    • minute Reference to an int for the minute
    • second Reference to an int for the second
    • timezone Reference to a float for the timezone
  • Return: True if the references have been filled with valid values from the GSM module, false otherwise.

functiongetNetworkUTCTime

bool getNetworkUTCTime(int * year, int * month, int * day, int * hour, int * minute, int * second, float * timezone)
  • Parameters:
    • year Reference to an int for the year
    • month Reference to an int for the month
    • day Reference to an int for the day
    • hour Reference to an int for the hour
    • minute Reference to an int for the minute
    • second Reference to an int for the second
    • timezone Reference to a float for the timezone
  • Return: True if the references have been filled with valid values from the GSM module, false otherwise.

functiongetNetworkEpoch

uint32_t getNetworkEpoch([TinyGSM_EpochStart](../files/_tiny_gsm_time_8tpp.md#a5addcc95a1822928505c18c8b9b9a277) epoch = <a href="_tiny_gsm_time_8tpp.html#a5addcc95a1822928505c18c8b9b9a277a15395d0642f86c5992abbca5e56e2b29" class="m-doc">TinyGSM_EpochStart::<wbr />UNIX</a>)
  • Parameters:
    • epoch The epoch start to use.
  • Return: The offset from the start of the epoch or 0 if the epoch could not be retrieved.

Generated by Doxygen and m.css with templates from doxybook2 Updated on 2026-09-11

Clone this wiki locally