Bash-Linux.com : Le SHELL pour les nuls

  Actuellement 50 lignes de commande et 1472 man disponibles
login as: root
root@213.186.33.18's password:
Last login: Sun Feb 12 8:20:01 2012 from 38.107.179.228
[root@bash-linux ~] # echo "Bienvenue sur Bash-Linux.com"_
 Manuel des commandes UNIX (man) Version anglaise

Indiquez la fonction :

Man Getdate en anglais

GETDATE(3) Linux Programmer's Manual GETDATE(3)
 
NAME


getdate, getdate_r - convert a string to struct tm
 
SYNOPSIS


#define _XOPEN_SOURCE 500 #include struct tm *getdate(const char *string); extern int getdate_err; #define _GNU_SOURCE #include int getdate_r(const char *string, struct tm *res);
 
DESCRIPTION


The function getdate() converts a string pointed to by string into the tm structure that it returns. This tm structure may be found in static storage, so that it will be overwritten by the next call. In contrast to strptime(3), (which has a format argument), getdate() uses the formats found in the file of which the full pathname is given in the environment variable DATEMSK. The first line in the file that matches the given input string is used for the conversion. The matching is done case insensitively. Superfluous whitespace, either in the pattern or in the string to be converted, is ignored. The conversion specifications that a pattern can contain are those given for strptime(3). One more conversion specification is accepted: %Z Timezone name. When %Z is given, the value to be returned is initialized to the bro- ken-down time corresponding to the current time in the given time zone. Otherwise, it is initialized to the broken-down time corresponding to the current local time. When only the weekday is given, the day is taken to be the first such day on or after today. When only the month is given (and no year), the month is taken to be the first such month equal to or after the current month. If no day is given, it is the first day of the month. When no hour, minute and second are given, the current hour, minute and second are taken. If no date is given, but we know the hour, then that hour is taken to be the first such hour equal to or after the current hour.
 
RETURN VALUE


When successful, this function returns a pointer to a struct tm. Oth- erwise, it returns NULL and sets the global variable getdate_err. Changes to errno are unspecified. The following values for getdate_err are defined: 1 The DATEMSK environment variable is null or undefined. 2 The template file cannot be opened for reading. 3 Failed to get file status information. 4 The template file is not a regular file. 5 An error is encountered while reading the template file. 6 Memory allocation failed (not enough memory available). 7 There is no line in the file that matches the input. 8 Invalid input specification.
 
ENVIRONMENT


DATEMSK File containing format patterns. TZ, LC_TIME Variables used by strptime(3).
 
CONFORMING TO


POSIX.1-2001.
 
NOTES


Since getdate() is not reentrant because of the use of getdate_err and the static buffer to return the result in, glibc provides a thread-safe variant. The functionality is the same. The result is returned in the buffer pointed to by res and in case of an error the return value is non-zero with the same values as given above for getdate_err. The POSIX.1-2001 specification for strptime(3) contains conversion specifications using the %E or %O modifier, while such specifications are not given for getdate(). The glibc implementation implements get- date() using strptime(3) so that automatically precisely the same con- versions are supported by both. The glibc implementation does not support the %Z conversion specifica- tion.
 
SEE ALSO


time(2), localtime(3), setlocale(3), strftime(3), strptime(3), fea- ture_test_macros(7)
 
COLOPHON


This page is part of release 3.05 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2007-07-26 GETDATE(3)


 Dernières recherches
Man  en anglais Man getdate en anglaisMan  en français Man getdate en français
Man  en anglais Man fgetpos en anglaisMan  en français Man fgetpos en français
Man  en anglais Man lesskey en anglaisMan  en français Man lesskey en français
Man  en anglais Man ctime_r en anglaisMan  en français Man ctime_r en français
Man  en anglais Man nologin en anglaisMan  en français Man nologin en français
Man  en anglais Man msgsnd en anglaisMan  en français Man msgsnd en français
Man  en anglais Man stdarg en anglaisMan  en français Man stdarg en français
Man  en anglais Man mkswap en anglaisMan  en français Man mkswap en français
Man  en anglais Man whatis en anglaisMan  en français Man whatis en français
Man  en anglais Man capset en anglaisMan  en français Man capset en français
Man  en anglais Man passwd en anglaisMan  en français Man passwd en français
Man  en anglais Man getsid en anglaisMan  en français Man getsid en français
Man  en anglais Man remove en anglaisMan  en français Man remove en français
Man  en anglais Man sscanf en anglaisMan  en français Man sscanf en français
Man  en anglais Man execvp en anglaisMan  en français Man execvp en français

 Recherche

Dans ce moteur de recherche, vous pouvez taper directement votre besoin, en une phrase normale, humaine.
Exemple : vous cherchez comment remplacer un mot par un autre dans tous les fichiers d'un certain dossier. Vous pouvez écrire "Comment remplacer un mot par un autre dans tous les fichiers d'un dossier". Le moteur vous ramenera les résultats en fonction de leur pertinence.
Vous pouvez bien sûr ne chercher qu'un seul mot-clé, par exemple "find".
 Toutes les lignes de code
Par popularité
Par fonction
Recherche avancée
 Les logiciels SHELL/SSH
Putty
Astuces Bash
Faire du SHELL avec PHP!
 La doc officielle
Les man Linux en français
Les man Linux en anglais
 Proposer vos bash
Partagez vos lignes!
 Les requêtes
Déposer une requête
Voir/répondre à une requête
 Quelques sites interessants
Bons sites pour apprendre
 Rechercher