# LocalizedDateTime

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-protranslate-core/struct-localizeddatetime/

**struct** · [`ferroui-protranslate-core`](/docs/0.5.0/api/ferroui-protranslate-core/) · v0.5.0

```rust
struct LocalizedDateTime
```

A Gregorian instant with an explicit UTC offset, suitable for `FormatArgument`.

`O` uses seven fractional digits, as the source composite formatter does.
Custom `f`/`F` tokens support up to nine digits for Rust's nanosecond precision.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/datetime.rs#L68)

## Members

- [`0`](#struct_field-0)
- [`new`](#function-new)
- [`value`](#function-value)
- [`from_unix_timestamp`](#function-from_unix_timestamp)
- [`format`](#function-format)

<a id="struct_field-0"></a>

### 0

```rust
0: time::OffsetDateTime
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/datetime.rs#L68)

<a id="function-new"></a>

### new

```rust
fn new(value: OffsetDateTime) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/datetime.rs#L70)

<a id="function-value"></a>

### value

```rust
fn value(self: Self) -> OffsetDateTime
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/datetime.rs#L73)

<a id="function-from_unix_timestamp"></a>

### from_unix_timestamp

```rust
fn from_unix_timestamp(seconds: i64, utc_offset_seconds: i32) -> Result<Self, TranslationError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/datetime.rs#L76)

<a id="function-format"></a>

### format

```rust
fn format(self: &Self, format: &str, culture: &Culture) -> Result<String, TranslationError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Core/datetime.rs#L86)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Debug`
- `Clone`
- `Copy`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- [`LocalizedFormat`](/docs/0.5.0/api/ferroui-protranslate-core/trait-localizedformat/)
- `From<OffsetDateTime>`
- `From<LocalizedDateTime>`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
