Page 1 of 1

Date and time?

Posted: Sat Jan 26, 2013 6:03 pm
by shari
When I right click on a note and choose insert date and time, everything but the year is correct. The year is always 2011. I can easily correct it, but on the next note, it's still 2011.

I've checked my date/time under System Preferences and it's set to the right year.

Re: Date and time?

Posted: Sat Jan 26, 2013 7:48 pm
by KB
Given that Scapple doesn't have any "insert date and time" feature, this must be provided by a third-party service you have installed, and nothing to do with Scapple. :)

Re: Date and time?

Posted: Mon Jan 28, 2013 4:36 pm
by shari
I use three word processing programs: Scrivener, Mellel, and Word 2008. I've tried right-clicking text in all three and this insert date and time line doesn't show up in any of them I also tried System and it's not there, either. Is there any way I can insert my screen shot or add an attachment to show you what it looks like in Scapple?

Re: Date and time?

Posted: Mon Jan 28, 2013 5:29 pm
by KB
Mellel and Word use a different text system; it sounds like you have a service installed that works with the standard OS X text system. If so, it will appear in Scrivener, TextEdit, and several others. Do you have DevonTHINK's WordService installed, perhaps? (You can upload a screenshot via the "Upload attachment" button below, but given that this is a third-party app issue, there's not much I'll be able to help with - you need to find out which service on your machine adds that service.)

Re: Date and time?

Posted: Mon Jan 28, 2013 7:13 pm
by shari
I had a trial DevonThink on my system for a while, but deleted it. Could this be a leftover artefact from that?

Re: Date and time?

Posted: Mon Jan 28, 2013 8:59 pm
by KB

You know what? My sincerest, most basest, and most humblest apologies. I have spent two days being a complete and utter idiot. I told you that Scapple doesn't have such a feature - but it does. D'oh. You'd never believe I was the coder, would you? :oops: My only excuse is that it didn't used to have such a feature, then someone asked for it, and I said no, that this was best left to an external service, then thought better of it and implemented it, which only took about five minutes because I already had the code in Scriv - so I then promptly forgot about it.

Uh, yeah, I'm really advertising us well here, aren't I?


Anyway, my being an idiot and realising my mistake doesn't help you, though, since Scapple gets its date and time from OS X. If it's reporting it wrong, then it's OS X's mistake, not Scapple's. How do I know this, you ask, when I couldn't even remember the code was there in the first place? It's because this is the code that makes the date text that gets inserted:

Code: Select all

[dateFormatter setDateStyle:NSDateFormatterMediumStyle];
   [dateFormatter setTimeStyle:NSDateFormatterShortStyle];
   NSString *currentDateStr = [dateFormatter stringFromDate:[NSDate date]];

These three lines can be translated into English as:

1. Use the "medium" date style as set in the "Region" pane of "Language & Text" in the System Preferences.
2 Use the "short" time style from the same place.
3. Grab the current date ( "[NSDate date]" ) and put it in that format.

This means that either:

1. OS X is returning the wrong date and time in Scrivener - you should check your clock settings for that - but you say you've already done so.

2. The regional settings in your system preferences are causing the date to be formatted funny in steps (1) and (2) above, causing a correct date returned by OS X to be formatted in such a way that it shows the wrong year. For that, you should check the "Region" settings of "Language & Text" in the System Preferences.

All the best,

Re: Date and time?

Posted: Mon Jan 28, 2013 10:54 pm
by shari
Chill. This is what beta testing is all about.

Okay, think I found it. I reset all my date formats for year-month-day and this means I have to use the Custom setting in Regions because if I set Canada (where I live) it insists on putting the format as month, day, year.