|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#include <wireshark.h>#include <time.h>Go to the source code of this file.
Classes | |
| struct | ws_timezone |
| Portable representation of timezone offset and name. More... | |
Functions | |
| WS_DLL_PUBLIC char * | ws_strptime (const char *buf, const char *format, struct tm *tm, struct ws_timezone *zonep) |
| Parse a date/time string using NetBSD's strptime() with the "C" locale. | |
| WS_DLL_PUBLIC char * | ws_strptime_p (const char *buf, const char *format, struct tm *tm) |
| Portable wrapper around the system's strptime(). | |
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| WS_DLL_PUBLIC char * ws_strptime | ( | const char * | buf, |
| const char * | format, | ||
| struct tm * | tm, | ||
| struct ws_timezone * | zonep | ||
| ) |
Parse a date/time string using NetBSD's strptime() with the "C" locale.
This function is a modified version of NetBSD's strptime(), adapted to always use the "C" locale for consistent parsing behavior across platforms. It converts the input string buf into broken-down time components stored in tm, according to the format string format. If available, timezone information is stored in the optional zonep structure.
| buf | Input string containing the date/time representation. |
| format | Format string specifying the expected structure of buf. |
| tm | Output structure to receive parsed time components. |
| zonep | Optional output for timezone offset and name (may be NULL). |
| WS_DLL_PUBLIC char * ws_strptime_p | ( | const char * | buf, |
| const char * | format, | ||
| struct tm * | tm | ||
| ) |
Portable wrapper around the system's strptime().
Provides a compatibility layer for parsing date/time strings using the system's native strptime() implementation. This wrapper ensures consistent behavior across platforms that support strptime(), without enforcing locale or timezone extensions.
| buf | Input string containing the date/time representation. |
| format | Format string specifying the expected structure of buf. |
| tm | Output structure to receive parsed time components. |