---
name: "SDL_GetDateTimeLocalePreferences"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetDateTimeLocalePreferences"
---

# SDL\_GetDateTimeLocalePreferences(3)

Gets the current preferred date and time format for the system locale.

## NAME

SDL\_GetDateTimeLocalePreferences - Gets the current preferred date and time format for the system locale.

## HEADER FILE

Defined in SDL3/SDL\_time.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**bool SDL\_GetDateTimeLocalePreferences(SDL\_DateFormat \*dateFormat, SDL\_TimeFormat \*timeFormat);**

## DESCRIPTION

This might be a "slow" call that has to query the operating system. It's best to ask for this once and save the results. However, the preferred formats can change, usually because the user has changed a system preference outside of your program.

## FUNCTION PARAMETERS

- *dateFormat*

  a pointer to the  **SDL\_DateFormat**\
    to hold the returned date format, may be NULL.

- *timeFormat*

  a pointer to the  **SDL\_TimeFormat**\
    to hold the returned time format, may be NULL.

## RETURN VALUE

Returns true on success or false on failure; call

**SDL\_GetError** () for more information.

## AVAILABILITY

This function is available since SDL 3.2.0.
