Changeset 664fc031 in mainline for uspace/lib/c/generic/time.c
- Timestamp:
- 2012-08-22T18:53:13Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2e6293b
- Parents:
- 077dad2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/time.c
r077dad2 r664fc031 849 849 * @return EOK or a negative error code 850 850 */ 851 int utctime2tm(const time_t time, struct tm *restrict result)851 int time_utc2tm(const time_t time, struct tm *restrict result) 852 852 { 853 853 assert(result != NULL); … … 876 876 * @return EOK or a negative error code. 877 877 */ 878 int utctime2str(const time_t time, char *restrict buf)878 int time_utc2str(const time_t time, char *restrict buf) 879 879 { 880 880 struct tm t; 881 881 int r; 882 882 883 if ((r = utctime2tm(time, &t)) != EOK)883 if ((r = time_utc2tm(time, &t)) != EOK) 884 884 return r; 885 885 886 t m2str(&t, buf);886 time_tm2str(&t, buf); 887 887 return EOK; 888 888 } … … 897 897 * bytes long. 898 898 */ 899 void t m2str(const struct tm *restrict timeptr, char *restrict buf)899 void time_tm2str(const struct tm *restrict timeptr, char *restrict buf) 900 900 { 901 901 assert(timeptr != NULL); … … 927 927 * @return EOK on success or a negative error code. 928 928 */ 929 int localtime2tm(const time_t time, struct tm *restrict result)929 int time_local2tm(const time_t time, struct tm *restrict result) 930 930 { 931 931 // TODO: deal with timezone … … 957 957 * @return EOK on success or a negative error code. 958 958 */ 959 int localtime2str(const time_t time, char *buf)959 int time_local2str(const time_t time, char *buf) 960 960 { 961 961 struct tm loctime; 962 962 int r; 963 963 964 if ((r = localtime2tm(time, &loctime)) != EOK)964 if ((r = time_local2tm(time, &loctime)) != EOK) 965 965 return r; 966 966 967 t m2str(&loctime, buf);967 time_tm2str(&loctime, buf); 968 968 969 969 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.