---
name: "NJB_Get_Time"
section: "3"
platform: "linux"
package: "libnjb1-doc"
version: "1.1-2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/NJB_Get_Time"
---

# NJB\_Get\_Time(3)

Get the local time on the NJB

## NAME

NJB\_Get\_Time - Get the local time on the NJB

## LIBRARY

libnjb

## SYNOPSIS

\#include \<libnjb.h\>

extern int njb\_error

njb\_time\_t \*NJB\_Get\_Time(njb\_t  **\*njb**);

## DESCRIPTION

This function retrieves the time of the internal clock that is fitted inside all jukeboxes. (Some jukeboxes does not announce the presence of a clock, or make it available in the menus of the firmware, but it is there in any case.)

The returned structure must be freed with the function free().

## TIME STRUCTURE

The time structure has the following form:

typedef struct {\
         int16\_t year;\
         int16\_t month;\
         int16\_t day;\
         int16\_t weekday;\
         int16\_t hours;\
         int16\_t minutes;\
         int16\_t seconds; } njb\_time\_t;

The values are quite self-explanatory. For the **weekday** setting, 0 is sunday and so forth. The hour setting is that of a 24 hour clock.

## SEE ALSO

[NJB\_Set\_Time(3)](/NJB_Set_Time/3.md)
