I wrote this plugin to help me sort events that I was importing for viewing with the date module. I only wanted to sort by day "granularity" but "granularity" doesn't really have any meaning when it comes to Unix timestamps :P
My solution was to round the timestamp down to the nearest "midnight". I actually did this ages ago but had to rewrite the plugin because it was in some archaic format with machine name callbacks and other things that were generating fatal errors on import :(
I don't know how useful this is to the wider community but patch is attached anyway in case someone wants a basic example of manipulating timestamps with Feeds Tamper.
Comment | File | Size | Author |
---|---|---|---|
#1 | timestamptodaystamp-plugin-1425218-1.patch | 0 bytes | thedavidmeister |
Comments
Comment #1
thedavidmeister CreditAttribution: thedavidmeister commentedhere's the patch
Comment #2
thedavidmeister CreditAttribution: thedavidmeister commentedhrmmm... patch didn't work >.<
code is here
Comment #3
twistor CreditAttribution: twistor commentedThis could be useful, I wonder why I never noticed this before.