ExtendedFormatTime Not working properly in caching application block

Topics: Caching Application Block
Sep 16, 2007 at 1:46 AM

We are using Caching application block with database storage

I have set the expiration date as Saturday Morning 8 AM , but the background scheduler has not removed the same from the database storage.basically not expired the same?

any ideas , please let me know if am missing anything.

Oct 18, 2007 at 9:19 PM
Edited Oct 18, 2007 at 9:26 PM
You have to use universal time as against the local time when you create the ExtendedFormatTime object.
In your case it should be like this:

DateTime refreshDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 8, 0, 0);
ExtendedFormatTime expireTime = new ExtendedFormatTime(string.Format("{0} {1} * * 6",
refreshDate.ToUniversalTime().Minute, refreshDate.ToUniversalTime().Hour));