Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 09-27-2010, 11:58 AM   #1
weasal
Junior Member
weasal began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Is there any way to control publication date?

I have a recipe that pulls a newspaper from another timezone and converts it to a mobi format book. I want to be able to control the publication date/time of the resulting book so it can be in the future.

For exmaple:

My local time is 6 pm, Sept 27, the newspaper's local time is 1 am next day, Sept 28 so the newspaper is from tomorrow (as far as I'm concerned).
At the moment, when I run the recipe, the publication date of the resulting book is Sept 27 and I want it to be Sept 28.

I noticed that the basic recipe uses nowf to obtain the dates for the publication date and timestamp used for the resulting book but I can't see a way to change the behavior.

Thanks!
weasal is offline   Reply With Quote
Old 09-27-2010, 12:05 PM   #2
desertgrandma
Enjoying the show....
desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.desertgrandma ought to be getting tired of karma fortunes by now.
 
desertgrandma's Avatar
 
Posts: 14,277
Karma: 8205255
Join Date: Jun 2008
Location: Arizona
Device: A K1, Kindle Paperwhite, an Ipod, IPad2, Iphone, an Ipad Mini & macAir
Welcome to MobileRead, weasal.
desertgrandma is offline   Reply With Quote
 
Enthusiast
Old 09-27-2010, 12:26 PM   #3
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Quote:
Originally Posted by weasal View Post
I have a recipe that pulls a newspaper from another timezone and converts it to a mobi format book. I want to be able to control the publication date/time of the resulting book so it can be in the future.

For exmaple:

My local time is 6 pm, Sept 27, the newspaper's local time is 1 am next day, Sept 28 so the newspaper is from tomorrow (as far as I'm concerned).
At the moment, when I run the recipe, the publication date of the resulting book is Sept 27 and I want it to be Sept 28.

I noticed that the basic recipe uses nowf to obtain the dates for the publication date and timestamp used for the resulting book but I can't see a way to change the behavior.

Thanks!
read this:
http://docs.python.org/library/time.html#time.strptime

example (I have not tested):
Code:
import time
log = '16/Jan/2010:18:11:06 +0100'
dt = time.strptime(log, '%d/%b/%Y:%H:%M:%S +0100')
you might also be able to try this in the recipe under the title section
timefmt = ' [%a,%d %B %Y %I:%M %p +0100]'
TonytheBookworm is offline   Reply With Quote
Old 09-27-2010, 12:34 PM   #4
weasal
Junior Member
weasal began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Thanks, but my problem is not how to format the date, I already do that and the articles do show the correct date. The problem is how to set the publish date on the mobi book itself. That would be the date that shows if you go to edit the meta data for a book in calibre.
weasal is offline   Reply With Quote
Old 09-27-2010, 12:37 PM   #5
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Looks like Kovid made it do local time... read this post http://www.mobileread.com/forums/showthread.php?t=57826 he might be able to tell you if there is a command to turn it off but i think it is internal.
TonytheBookworm is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Up-to-date candy teacher (date being 1921) kacir Deals, Freebies, and Resources (No Self-Promotion) 0 06-16-2010 04:18 PM
Windows Publication Foundation & ilead korz iRex 3 03-27-2007 11:56 AM
new official shipping date / US invitation date R2D2 iRex 18 07-06-2006 02:32 PM


All times are GMT -4. The time now is 06:05 AM.


MobileRead.com is a privately owned, operated and funded community.