Fossil

Check-in [147f4bfb]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:dropped back to a simpler timestamp generation mechanism. Thanks to Ge Weijers for the input.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | json
Files: files | file ages | folders
SHA1: 147f4bfb62bfb948b6a63fb60ec7a9327690cc54
User & Date: stephan 2011-09-17 01:25:47.274
Context
2011-09-17
14:24
logout now fails if the auth token is not available to it (as a sanity check and potentially stop someone from logging out someone else). ... (check-in: affdf56c user: stephan tags: json)
01:25
dropped back to a simpler timestamp generation mechanism. Thanks to Ge Weijers for the input. ... (check-in: 147f4bfb user: stephan tags: json)
2011-09-16
23:29
Added some code for dumbing-down only the different login errors (missing name, missing pw, or no match found). Defaults to dumbed-down mode. ... (check-in: 388c9888 user: stephan tags: json)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/json.c.
556
557
558
559
560
561
562


563
564





565
566
567
568
569
570
571

  tmp = cson_value_new_string(MANIFEST_UUID,strlen(MANIFEST_UUID));
  SET("fossil");
 
  {/* "timestamp" */
    cson_int_t jsTime;
#if 1


    /* Ge Weijers has pointed out that time(0) commonly returns
       GMT, but is not required to by the standard.





    */
    time_t const t = (time_t)time(0);
    struct tm gt = *gmtime(&t);
    gt.tm_isdst = -1;
    jsTime = (cson_int_t)mktime(&gt);
#else
    /* i'm not 100% sure that the above actually does what i expect,







>
>

|
>
>
>
>
>







556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578

  tmp = cson_value_new_string(MANIFEST_UUID,strlen(MANIFEST_UUID));
  SET("fossil");
 
  {/* "timestamp" */
    cson_int_t jsTime;
#if 1
    jsTime = (cson_int_t)time(0);
#elif 1
    /* Ge Weijers has pointed out that time(0) commonly returns
       UTC, but is not required to by The Standard.

       There is a mkfmtime() function in cgi.c but it requires
       a (tm *), and i don't have that without calling gmtime()
       or populating the tm myself (which is what i'm trying to
       have done for me!).
    */
    time_t const t = (time_t)time(0);
    struct tm gt = *gmtime(&t);
    gt.tm_isdst = -1;
    jsTime = (cson_int_t)mktime(&gt);
#else
    /* i'm not 100% sure that the above actually does what i expect,