Sun Studio 12: C User's Guide

E.1.15 Locale-Specific Behavior (G.4)

E.1.15.1 (7.12.1) The local time zone and Daylight Savings Time:

The local time zone is set by the environment variable TZ.

(7.12.2.1) The era for the clock function

The era for the clock is represented as clock ticks with the origin at the beginning of the execution of the program.

The following characteristics of a hosted environment are locale-specific:

(5.2.1) The content of the execution character set, in addition to the required members:

Locale-specific (no extension in C locale).

(5.2.2) The direction of printing:

Printing is always left to right.

(7.1.1) The decimal-point character:

Locale-specific (“.” in C locale).

(7.3) The implementation-defined aspects of character testing and case mapping functions:

Same as 4.3.1.

(7.11.4.4) The collation sequence of the execution character set:

Locale-specific (ASCII collation in C locale).

(7.12.3.5) The formats for time and date:

Locale-specific. Formats for the C locale are shown in the tables below. The names of the months are:

Table E–9 Names of Months

January 

May 

September 

February 

June 

October 

March 

July 

November 

April 

August 

December 

The names of the days of the week are:

Table E–10 Days and Abbreviated Days of the Week

Days  

 

Abbreviated Days  

 

Sunday 

Thursday 

Sun 

Thu 

Monday 

Friday 

Mon 

Fri 

Tuesday 

Saturday 

Tue 

Sat 

Wednesday 

 

Wed 

 

The format for time is:

%H:%M:%S

The format for date is:

%m/%d/%y

The formats for AM and PM designation are: AM PM