Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 04, 2016, 08:19:45 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: T-Clock 2010 (download)  (Read 440343 times)

henriko

  • Member
  • Joined in 2013
  • **
  • Posts: 1
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download) - Week number - ISO-8601
« Reply #450 on: February 27, 2013, 05:16:55 AM »
Hi Stoic Joker, and others. I'm not sure if there are going to be any more "official" builds from you, or if the project really is closed. But anyway. If someone will make a new build, here is a contribution to format.c , that will provide week numbers according to the ISO-8601 standard.

I hope that someone can make some use of it, and in that case document the feature where it should be documented. I have chosen Wi as the new format identifier for ISO-8601 week number.

It might be used like this:
vWi yymmdd hh:nn
v9 130217 12:14

format.c diff
535a536,613
> else if(*(sp + 1) == 'i') { // Week ISO-8601 (by henriko.se)
> int ISOWeek;
> struct tm *ptrtmLocalTime;
> struct tm tmCurrentTime;
> struct tm tmStartOfCurrentYear;
> ptrtmLocalTime = localtime(&ltime);
> tmCurrentTime = *ptrtmLocalTime;
> mktime(&tmCurrentTime);
> if(tmCurrentTime.tm_wday == 0)
> {
> tmCurrentTime.tm_wday = 7;
> }
> tmStartOfCurrentYear.tm_year = tmCurrentTime.tm_year;
> tmStartOfCurrentYear.tm_mon = 1 - 1;
> tmStartOfCurrentYear.tm_mday = 1;
> tmStartOfCurrentYear.tm_hour = 0;
> tmStartOfCurrentYear.tm_min = 0;
> tmStartOfCurrentYear.tm_sec = 0;
> tmStartOfCurrentYear.tm_isdst = 0;
> mktime(&tmStartOfCurrentYear);
> if(tmStartOfCurrentYear.tm_wday == 0)
> {
> tmStartOfCurrentYear.tm_wday = 7;
> }
> ISOWeek = (tmCurrentTime.tm_yday + (tmStartOfCurrentYear.tm_wday - 1)) / 7 + (tmStartOfCurrentYear.tm_wday <= 4 ? 1 : 0);
> if(ISOWeek == 0)
> {
> struct tm tmStartOfLastYear;
> struct tm tmEndOfLastYear;
> tmStartOfLastYear.tm_year = tmCurrentTime.tm_year - 1;
> tmStartOfLastYear.tm_mon = 1 - 1;
> tmStartOfLastYear.tm_mday = 1;
> tmStartOfLastYear.tm_hour = 0;
> tmStartOfLastYear.tm_min = 0;
> tmStartOfLastYear.tm_sec = 0;
> tmStartOfLastYear.tm_isdst = 0;
> mktime(&tmStartOfLastYear);
> if(tmStartOfLastYear.tm_wday == 0)
> {
> tmStartOfLastYear.tm_wday = 7;
> }
> tmEndOfLastYear.tm_year = tmCurrentTime.tm_year - 1;
> tmEndOfLastYear.tm_mon = 12 - 1;
> tmEndOfLastYear.tm_mday = 31;
> tmEndOfLastYear.tm_hour = 0;
> tmEndOfLastYear.tm_min = 0;
> tmEndOfLastYear.tm_sec = 0;
> tmEndOfLastYear.tm_isdst = 0;
> mktime(&tmEndOfLastYear);
> ISOWeek = (tmEndOfLastYear.tm_yday + (tmStartOfLastYear.tm_wday - 1)) / 7 + (tmStartOfLastYear.tm_wday <= 4 ? 1 : 0);
> }
> if(tmCurrentTime.tm_mon == 12 - 1 && tmCurrentTime.tm_mday >= 29) {
> if(tmCurrentTime.tm_wday <= 3)
> {
> struct tm tmStartOfNextYear;
> tmStartOfNextYear.tm_year = tmCurrentTime.tm_year + 1;
> tmStartOfNextYear.tm_mon = 1 - 1;
> tmStartOfNextYear.tm_mday = 1;
> tmStartOfNextYear.tm_hour = 0;
> tmStartOfNextYear.tm_min = 0;
> tmStartOfNextYear.tm_sec = 0;
> tmStartOfNextYear.tm_isdst = 0;
> mktime(&tmStartOfNextYear);
> if(tmStartOfNextYear.tm_wday == 0)
> {
> tmStartOfNextYear.tm_wday = 7;
> }
> if(tmStartOfNextYear.tm_wday <= 4)
> {
> ISOWeek = 1;
> }
> }
> }
> wsprintf(szWkNum, "%d", ISOWeek);
> Wk = szWkNum;
> while(*Wk) *dp++ = *Wk++;
> sp++;
> }

iflyun

  • Participant
  • Joined in 2013
  • *
  • Posts: 1
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #451 on: April 27, 2013, 08:06:05 AM »
Hi, First off thanks for the great extension. I have a clear theme for windows 7 which doesn't darken the tray so i'm having a hard time reading the clock with white backgrounds. Is there a way to solve this problem? Changing the color of the text doesn't do anything and I'd prefer it to be white anyway.

Untitled.jpg

Maybe something like subtitles on movies where the font is black and white?
or this Variable Text Color

Help? Just being able to change the color would be a start.
« Last Edit: April 27, 2013, 08:23:28 AM by iflyun »

LonelyPixel

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #452 on: May 03, 2013, 02:07:30 PM »
Thank you Henrik for this patch. It was sitting in my inbox for a long time but I finally got around to apply it the build 98 and make a new build of it. I'm now testing it, which obviously may take a few days (and then some more years...). I've just put all three - Wi, Wm and Ww - in two rows to see when they differ.

In case anybody is interested, I've uploaded my build here:
http://unclassified....20130503.f9f71075.7z

It's basically the original build 98, upgraded for Visual Studio 2010, with the patch above applied. The archive contains all files from the Release directory that don't look like compiler stuff.

Stoic Joker

  • Moderator
  • Joined in 2008
  • *****
  • Posts: 6,294
    • View Profile
    • www.StoicJoker.com
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #453 on: May 03, 2013, 07:20:27 PM »
Thanks to henriko for sharing a fix, and LonelyPixel for creating and sharing a build including the fix. I really still haven't even had time to fix my own copy... :-[

@LonelyPixel - If you like, I can add the link to your build to the first post so it's easier for people to find...else it might get lost back here on page 19. I'm still getting about 9 Emails a week about that bugg...So there's a huge calling for it.

LonelyPixel

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #454 on: May 04, 2013, 05:49:36 AM »
If you like, I can add the link to your build to the first post so it's easier for people to find...else it might get lost back here on page 19.

I have nothing against it, but this link is temporary so it may disappear some time in the future, either when it's replaced by a newer version or somebody else publishes a better one...

I'm not sure about your source code licence, I haven't found any information about it. I could put up a repository on Github and also upload current source builds there. That would be a more "suitable" location for such things. (I wouldn't want to setup a real project page on my dev website because it's not my project.) But I couldn't really maintain the code, just update it from other locations and integrate ready patches. How do you manage your source code? Could you work with a Github repository as well? (It could save you from data loss as well... :))

WhiteTigX

  • Moderator
  • Joined in 2013
  • *****
  • Posts: 121
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #455 on: May 30, 2013, 09:39:23 PM »
In case you guys still want to know how to display the windoze calendar, its possible ;)
  • Find the tray window with class: "Shell_TrayWnd"
  • find control with class: "TrayClockWClass"
  • PostMessage: WM_USER+102,1,0
IIRC you already got that handle.. or at least a system to find such windows/controls. I just can't implement it myself as I'm a gcc developer and I don't want to convert your source :P

P.S. wParam=0 or WM_USER+103 will show the original tooltip... (which I prefer... not only because it will show different time zones)
My current release of T-Clock Redux can always be found here, on my Github releases page
« Last Edit: May 30, 2013, 09:46:58 PM by WhiteTigX »

Stoic Joker

  • Moderator
  • Joined in 2008
  • *****
  • Posts: 6,294
    • View Profile
    • www.StoicJoker.com
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #456 on: June 04, 2013, 06:45:07 AM »
In case you guys still want to know how to display the windoze calendar, its possible ;)
  • Find the tray window with class: "Shell_TrayWnd"
  • find control with class: "TrayClockWClass"
  • PostMessage: WM_USER+102,1,0
IIRC you already got that handle.. or at least a system to find such windows/controls. I just can't implement it myself as I'm a gcc developer and I don't want to convert your source :P

P.S. wParam=0 or WM_USER+103 will show the original tooltip... (which I prefer... not only because it will show different time zones)

I'd hate to admit how much time I spent trying to fond that information ...(and never did)... Thank you for making it available. I only wish I had the time to play with it.


If you like, I can add the link to your build to the first post so it's easier for people to find...else it might get lost back here on page 19.

I have nothing against it, but this link is temporary so it may disappear some time in the future, either when it's replaced by a newer version or somebody else publishes a better one...

I'm not sure about your source code licence, I haven't found any information about it. I could put up a repository on Github and also upload current source builds there. That would be a more "suitable" location for such things. (I wouldn't want to setup a real project page on my dev website because it's not my project.) But I couldn't really maintain the code, just update it from other locations and integrate ready patches. How do you manage your source code? Could you work with a Github repository as well? (It could save you from data loss as well... :))

Greetings, sorry about the delay...but I really wasn't sure how to answer the licensing question (I tend to find them annoying). The original author (Kazubon) created TClock as a teaching tool to show people how to code for the then new Windows 95 shell. So given that the original author intended it to be for everyone to use and learn from...(to my way of thinking)...I would be in extremely poor taste for me to impose any sort of licensing/restrictions on T-Clock's code. I have merely been the projects caretaker for the last decade or so. It is to belong to everyone.

I've never actually used Github or any of the other source management systems but if it makes it easier for you to manage your branch of the project... *Shrug* ...is ok by me ;)

Given that T-Clock's home (according to Google...) has been here for quite some time, I'd be happy to list/link to any of the builds here so they are easier for people to find if/when they go looking.

------------------------------
Post #: 4,000

LonelyPixel

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #457 on: June 04, 2013, 07:22:59 AM »
Alright, so from a licensing perspective, either BSD (or the similar MIT) licence or Public Domain would be appropriate. BSD/MIT require keeping any existing author/copyright notices but allow everything else. Public Domain should actually allow everything with no restriction whatsoever. BSD/MIT are very common among open-source projects with a very liberal licence, and Public Domain is for instance used by the very popular SQLite project.

As for GitHub, I actually wouldn't need to maintain "my branch" of T-Clock. (I'm just a user who wants to see it working...) My idea was to find a place for the latest version of the code for every contributor to contribute to and hence for every interested user to get it from. I've seen three current contributors so far, one being you and the other two being the most recent patch commenters in this forum. I don't see myself as one of them so far. It would of course be most useful if everybody had access to this one location and GitHub could be it. (There are sure other sites like CodePlex and you name it, but my personal experience is limited to GitHub. Also, I'm not fully aware of how multi-contributor cooperation really truly works with GitHub, but at least one repository is certainly a start for it.)

Long story short, I'll just create a repo there, upload my latest build of it and publish the URL. You could then also use that link for this site and we'll see how it goes with further contributions and patches. No obligations at all.

Stoic Joker

  • Moderator
  • Joined in 2008
  • *****
  • Posts: 6,294
    • View Profile
    • www.StoicJoker.com
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #458 on: June 04, 2013, 09:30:47 AM »
Sounds like a plan ... Thank you!

LonelyPixel

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #459 on: June 04, 2013, 01:30:06 PM »
The source code is now up: https://github.com/dg9ngf/T-Clock

The download archive isn't all as lucky. GitHub has discontinued the file download feature, because it was confusing as they say. Too bad, it served me well. I'm currently trying the Google Drive hosting, but it has been proven to be complicated to handle in the past. Plus it's not really part of the repository so that other contributors could replace it... Maybe I'll just include it in the source code repository as well.

Stoic Joker

  • Moderator
  • Joined in 2008
  • *****
  • Posts: 6,294
    • View Profile
    • www.StoicJoker.com
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #460 on: June 04, 2013, 03:02:48 PM »
GitHub source code repository link added to first post/page.

paul_ray

  • Supporting Member
  • Joined in 2010
  • **
  • default avatar
  • Posts: 7
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #461 on: June 10, 2013, 06:37:54 PM »
I don't know if there are plans to use the "GetTickCount64" function instead of the "GetTickCount" function in getting the uptime but it would be nice.

The new function does not have the 49.7 day limit.
It is supported starting with Vista.
(It does not require 64 bit OS).

http://msdn.microsof...724411(v=VS.85).aspx

Hm... (there are now) That is an interesting option. Actually I had been planning to try using the other method that leverages the info stored in HKEY_PERFORMANCE_DATA ... But this sounds much easier/simpler/quicker - Not to mention a 585 million year wrap/limit should be sufficient for most folks... ;)

Thank you!

In looking at the code in on GitHub, I found the section that would have to be changed to support the new function.
In the format.c file around line 461, there is this comment "<--+++--<<<<< WTF (If AnyThing) Does This Do?!?!?!?"
In this block, the "st" would have to be a long (ULONGLONG). Then the function would be GetTickCount64().

Note a check for the OS version would need to be done here to see which version to call.

This section (with the comment "<--+++--<<<<< WTF (If AnyThing) Does This Do?!?!?!?") does the "System Uptime".

power1power1

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #462 on: June 19, 2013, 09:52:11 PM »
quick question: How I can display GMT time? I know of w+05 thing but "05" is not constant and changes when daylight saving starts ...  :tellme:

LonelyPixel

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #463 on: June 20, 2013, 02:21:48 AM »
Why not set your computer's time zone to UTC instead of your local time zone? So it would be consistent with every other appearance of a clock in the system.

Stoic Joker

  • Moderator
  • Joined in 2008
  • *****
  • Posts: 6,294
    • View Profile
    • www.StoicJoker.com
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #464 on: June 20, 2013, 06:21:06 AM »
IIRC GMT, UTC, & Zulu are all different ways to refer to the same thing (been awhile since I looked it up). T-Clock uses the system clock for its time source, so if the system is set to use DST then T-Clock has no choice but to do the same.

power1power1

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #465 on: June 20, 2013, 07:51:54 AM »
May be the system has a vaiable that shows the offset considering the daylight saving. Then, instead of a fixed number, say 05, we could use that vaiable to figure out GMT time.

I actually wanted to use this as the Mouse-Over Tooltip Text.

power1power1

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #466 on: July 23, 2013, 08:48:23 AM »
I just noticed that using TZN option in Time Format always shows PDT even if the computer is set to EDT and after a restart of the program.
« Last Edit: July 23, 2013, 09:41:18 AM by power1power1 »

Stoic Joker

  • Moderator
  • Joined in 2008
  • *****
  • Posts: 6,294
    • View Profile
    • www.StoicJoker.com
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #467 on: July 23, 2013, 11:31:23 AM »
TZN ... Time Zone? The locale dropdown at the top of the Time Format tab is for altering the character set the clock display uses. Which it doesn't do well in my builds for some reason ... Never did figure that one out.

power1power1

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #468 on: July 23, 2013, 07:22:22 PM »
Well yes, I meant Time Zone Name. I was trying to use TZN as part of Advanced Clock Configuration Options to show something like this: h:nn:ss tt TZN ---> 2:14:36 PM EDT

Stoic Joker

  • Moderator
  • Joined in 2008
  • *****
  • Posts: 6,294
    • View Profile
    • www.StoicJoker.com
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #469 on: July 24, 2013, 06:52:57 AM »
Um... I don't recall TZN being a format specifier option ...(not that I wasn't adding all sorts of stuff at one point)... Which T-Clock are you using?? I've got build 95 here at work and TZN does nothing.

power1power1

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #470 on: July 24, 2013, 08:32:16 AM »
I found TZN option in "T-Clock Help.rtf" file. I am using LonelyPixel's version.

Stoic Joker

  • Moderator
  • Joined in 2008
  • *****
  • Posts: 6,294
    • View Profile
    • www.StoicJoker.com
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #471 on: July 24, 2013, 11:49:25 AM »
Ah! That explains it then...I'm an idiot.

I had to poke through the source for LonleyPixel's build for a bit...

The TZN was/is a beta feature I was playing with that was part of the build 98 source code that I released when I announced that I was going to have to shutdown the project. It should track the system's time zone setting ... But I've unfortunately not a clue why it might be failing.

power1power1

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #472 on: July 24, 2013, 06:31:05 PM »
Please, please, please resurrect the project :)
It is a nice piece of software and a lot of people are using it ...

21944.450

  • Participant
  • Joined in 2013
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #473 on: August 16, 2013, 06:42:07 AM »
I'd like the option to bring up the default Windows calendar/analog clock thing when I click it. If I understood correctly, didn't someone just figure out a way to do that?

WhiteTigX

  • Moderator
  • Joined in 2013
  • *****
  • Posts: 121
    • View Profile
    • Donate to Member
Re: T-Clock 2010 (download)
« Reply #474 on: August 28, 2013, 03:34:52 PM »
here you go.. (hope the 64bit build does work...)
I've also removed the T-Clock tooltip stuff... so this will only show the original tooltip and calendar.

So there's still stuff to do... add options to choose which calendar to use (or maybe not :P) or to use T-Clock's custom tooltip instead of windows default one... etc.
Also... I couldn't find a way to get the same behavior as the default clock... so clicking T-Clock once will open the calendar, clicking it again while the calendar was open will just reopen it and not just close it as the default clock does...

Anyway.. the build should be stable and hopefully enough for you ;) (it's enough for me :P)

P.S. sry about the delay... I just saw your post today^^
P.P.S. I didn't upload the source right now as it's not clear how it should be implemented and my current source is quite ugly :P Otherwise I would have created a Git folk to make it easy to implement it on the master (and I would have run astyle on the source, besides other cleanup stuff)

@edit:
removed attachments (32bit downloaded 5 times, 64bit 7 times)
new downloads: http://www.donationc....msg336616#msg336616
My current release of T-Clock Redux can always be found here, on my Github releases page
« Last Edit: September 02, 2013, 04:25:20 PM by WhiteTigX »