mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 08:28:34 +00:00
rename: os_get_localtime => os_localtime
This commit is contained in:
@@ -262,7 +262,7 @@ static bool v_do_log_to_file(FILE *log_file, int log_level,
|
|||||||
|
|
||||||
// format current timestamp in local time
|
// format current timestamp in local time
|
||||||
struct tm local_time;
|
struct tm local_time;
|
||||||
if (os_get_localtime(&local_time) == NULL) {
|
if (os_localtime(&local_time) == NULL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
char date_time[20];
|
char date_time[20];
|
||||||
|
@@ -114,12 +114,12 @@ struct tm *os_localtime_r(const time_t *restrict clock,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Obtains the current Unix timestamp and adjusts it to local time.
|
/// Gets the current Unix timestamp and adjusts it to local time.
|
||||||
///
|
///
|
||||||
/// @param result Pointer to a 'struct tm' where the result should be placed
|
/// @param result Pointer to a 'struct tm' where the result should be placed
|
||||||
/// @return A pointer to a 'struct tm' in the current time zone (the 'result'
|
/// @return A pointer to a 'struct tm' in the current time zone (the 'result'
|
||||||
/// argument) or NULL in case of error
|
/// argument) or NULL in case of error
|
||||||
struct tm *os_get_localtime(struct tm *result) FUNC_ATTR_NONNULL_ALL
|
struct tm *os_localtime(struct tm *result) FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
time_t rawtime = time(NULL);
|
time_t rawtime = time(NULL);
|
||||||
return os_localtime_r(&rawtime, result);
|
return os_localtime_r(&rawtime, result);
|
||||||
|
Reference in New Issue
Block a user