| 1234567891011121314151617181920212223242526 |
- #import <Foundation/Foundation.h>
- #include <stdlib.h>
- #include <string.h>
- extern "C"
- {
- const char* IOS_GetLocalTimeZoneId()
- {
- NSString *identifier = [NSTimeZone localTimeZone].name;
- if (identifier == nil)
- {
- return strdup("UTC");
- }
- return strdup(identifier.UTF8String);
- }
- void IOS_FreeCString(const char* pointer)
- {
- if (pointer != nullptr)
- {
- free((void*)pointer);
- }
- }
- }
|