function prefix_pronamic_datetime_default_format( $format ) {
return _x( 'D j M Y \a\t H:i', 'default datetime format', 'pronamic-ideal' );
}
add_filter( 'pronamic_datetime_default_format', 'prefix_pronamic_datetime_default_format' );
It is important to note that date_i18n()
:
- does not have full feature parity with
date()
, not all formats are supported (such as shorthands); - does not accept Unix timestamp (despite documented to), the expected value is “WordPress timestamp” (offset by time zone);
- has issues with certain timezone settings, such as numerical ones;
- does nothing with
$gmt
argument under normal circumstances;
Any use of this function must be carefully audited for correctness, especially in regards to output of time zones.