Skip to content

Commit

Permalink
Possible fix for notepad-plus-plus#215 issue.
Browse files Browse the repository at this point in the history
To prevent this bug should always update timezone global variables by void _tzset( void );
https://msdn.microsoft.com/en-us/library/90s5c885.aspx
  • Loading branch information
Hero2006 committed Aug 24, 2015
1 parent 091082c commit 104c2f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions PowerEditor/src/MISC/Common/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <windows.h>
#include <iso646.h>
#include <cstdint>
#include <time.h>


const bool dirUp = true;
Expand Down Expand Up @@ -63,7 +64,7 @@ const bool dirDown = false;
#define generic_sscanf swscanf
#define generic_fopen _wfopen
#define generic_fgets fgetws
#define generic_stat _wstat
#define basic_generic_stat _wstat
#define generic_sprintf swprintf
#define COPYDATA_FILENAMES COPYDATA_FILENAMESW
#else
Expand All @@ -85,11 +86,13 @@ const bool dirDown = false;
#define generic_sscanf sscanf
#define generic_fopen fopen
#define generic_fgets fgets
#define generic_stat _stat
#define basic_generic_stat _stat
#define generic_sprintf sprintf
#define COPYDATA_FILENAMES COPYDATA_FILENAMESA
#endif

#define generic_stat(path, dataStruct) (_tzset(), basic_generic_stat(path, dataStruct))

typedef std::basic_string<TCHAR> generic_string;

void folderBrowser(HWND parent, int outputCtrlID, const TCHAR *defaultStr = NULL);
Expand Down

0 comments on commit 104c2f1

Please sign in to comment.