wxWidgets: interface/wx/time.h File Reference

| Version: 3.1.7

Loading...
Searching...
No Matches
Functions
time.h File Reference

## Functions
int | wxGetTimeZone ()
| Returns the difference between UTC and local time in seconds.
long | wxGetLocalTime ()
| Returns the number of seconds since local time 00:00:00 Jan 1st 1970.
wxLongLong | wxGetLocalTimeMillis ()
| Returns the number of milliseconds since local time 00:00:00 Jan 1st 1970.
long | wxGetUTCTime ()
| Returns the number of seconds since GMT 00:00:00 Jan 1st 1970.
wxLongLong | wxGetUTCTimeMillis ()
| Returns the number of milliseconds since GMT 00:00:00 Jan 1st 1970.
wxLongLong | wxGetUTCTimeUSec ()
| Returns the number of microseconds since GMT 00:00:00 Jan 1st 1970.

## Function Documentation

## ◆ wxGetLocalTime()

long wxGetLocalTime | ( |  | ) |

Returns the number of seconds since local time 00:00:00 Jan 1st 1970.

See also
  wxDateTime::Now()

Include file:

    #include <wx/time.h>

## ◆ wxGetLocalTimeMillis()

wxLongLong wxGetLocalTimeMillis | ( |  | ) |

Returns the number of milliseconds since local time 00:00:00 Jan 1st 1970.

The use of wxGetUTCTimeMillis() is preferred as it provides a usually (except for changes to the system time) monotonic clock which the local time also changes whenever DST begins or ends.

See also
  wxDateTime::Now(), wxGetUTCTimeMillis(), wxGetUTCTimeUSec()

Include file:

    #include <wx/time.h>

## ◆ wxGetTimeZone()

int wxGetTimeZone | ( |  | ) |

Returns the difference between UTC and local time in seconds.

This function intentionally doesn't take DST into account, i.e. the offset returned is the same one independently of when the function is called.

Include file:

    #include <wx/time.h>

## ◆ wxGetUTCTime()

long wxGetUTCTime | ( |  | ) |

Returns the number of seconds since GMT 00:00:00 Jan 1st 1970.

See also
  wxDateTime::Now()

Include file:

    #include <wx/time.h>

## ◆ wxGetUTCTimeMillis()

wxLongLong wxGetUTCTimeMillis | ( |  | ) |

Returns the number of milliseconds since GMT 00:00:00 Jan 1st 1970.

Include file:

    #include <wx/time.h>

Since
  2.9.3

## ◆ wxGetUTCTimeUSec()

wxLongLong wxGetUTCTimeUSec | ( |  | ) |

Returns the number of microseconds since GMT 00:00:00 Jan 1st 1970.

Include file:

    #include <wx/time.h>

Since
  2.9.3