Just for the record I have made a crude macro to overcome the timezone date 
display problem. In my case the date number string stored in my tiddler 
field named "date" like this: 20180115000000000. Now for operations such as 
sorting there was no problem. Only thing was that when browser displayed 
the date it changed it according to my timezone. So all i wanted was to 
display the date as it was. So i made this macro: 

(function(){

"use strict";
exports.name = "myViewDate";
exports.params = [
        {name: "dateValue"}
];

exports.run = function(dateValue) {
//20180112060000000

        var yr= dateValue.slice(0,4);
        var mnth= dateValue.slice(4,6);
        var mnthstr="";
        var day= dateValue.slice(6,8);

        switch (mnth) {
           case "01":
               mnthstr = "January";
               break;
           case "02":
               mnthstr= "February";
               break;
           case "03":
               mnthstr= "March";
               break;
           case "04":
               mnthstr= "April";
               break;
           case "05":
               mnthstr= "May";
               break;
           case "06":
               mnthstr= "June";
               break;
           case "07":
               mnthstr= "July";
               break;
           case "08":
               mnthstr= "August";
               break;
           case "09":
               mnthstr= "September";
               break;
           case "10":
               mnthstr= "October";
               break;
           case "11":
               mnthstr= "November";
               break;
           case "12":
               mnthstr= "December";
               break;
}

        return day+" "+mnthstr+" "+yr;

};

})();



So wherever I needed to display the date I call this macro:

<$macrocall $name="myViewDate" dateValue={{!!date}} />

And this works for me. Just thought this might help somebody.





-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4bebbe0c-aa54-49c3-aac1-3701301240cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to