Ask Experts Questions for FREE Help !
Ask
    notcoolenough's Avatar
    notcoolenough Posts: 95, Reputation: 7
    Junior Member
     
    #1

    Sep 10, 2015, 05:41 PM
    XML Question Regarding Time Synchronizing.
    I am posting this here because it is an XML question, but it applies to my Ubuntu Linux Wallpaper. My wallpaper is an XML file that displays 8 wallpaper photos, slightly altered, to reflect the time of day. I got it off the internet and it was made years ago. It is great and it works, but it is out of sync.

    The slideshow SHOULD start over again at midnight, making it's first change at 5am. The duration times of each transition from one photo to the next all add up to 24 hours. My problem is that it seems to be starting at around 5PM instead and I cannot figure out why. I have played around with the duration times, but nothing works. At the moment, I just have it changing every hours which is working, but I would love to simplify the file since half of it is nearly redundant.

    Here is the original markup:

    Code:
    <background><starttime>
    <year>2015</year>
    <month>09</month>
    <day>08</day>
    <hour>0</hour>
    <minute>0</minute>
    <second>01</second>
    </starttime>
    
    
    <static>
    <duration>18000.0</duration>
    <file>/home/b/Pictures/Wallpapers/AllDayLong/08.jpg</file>
    </static>
    <!-- it is now 5h -->
    <transition type="overlay">
    <duration>7200.0</duration>
    <from>/home/b/Pictures/Wallpapers/AllDayLong/08.jpg</from>
    <to>/home/b/Pictures/Wallpapers/AllDayLong/01.jpg</to>
    </transition>
    <!-- it is now 7h -->
    <transition type="overlay">
    <duration>7200.0</duration>
    <from>/home/b/Pictures/Wallpapers/AllDayLong/01.jpg</from>
    <to>/home/b/Pictures/Wallpapers/AllDayLong/02.jpg</to>
    </transition>
    <!-- it is now 9h -->
    <transition type="overlay">
    <duration>7200.0</duration>
    <from>/home/b/Pictures/Wallpapers/AllDayLong/02.jpg</from>
    <to>/home/b/Pictures/Wallpapers/AllDayLong/03.jpg</to>
    </transition>
    <!-- it is now 11h -->
    <transition type="overlay">
    <duration>7200.0</duration>
    <from>/home/b/Pictures/Wallpapers/AllDayLong/03.jpg</from>
    <to>/home/b/Pictures/Wallpapers/AllDayLong/04.jpg</to>
    </transition>
    <!-- it is now 13h -->
    <transition type="overlay">
    <duration>7200.0</duration>
    <from>/home/b/Pictures/Wallpapers/AllDayLong/04.jpg</from>
    <to>/home/b/Pictures/Wallpapers/AllDayLong/05.jpg</to>
    </transition>
    <!-- it is now 15h -->
    <transition type="overlay">
    <duration>7200.0</duration>
    <from>/home/b/Pictures/Wallpapers/AllDayLong/05.jpg</from>
    <to>/home/b/Pictures/Wallpapers/AllDayLong/06.jpg</to>
    </transition>
    <!-- it is now 17h -->
    <transition type="overlay">
    <duration>7200.0</duration>
    <from>/home/b/Pictures/Wallpapers/AllDayLong/06.jpg</from>
    <to>/home/b/Pictures/Wallpapers/AllDayLong/07.jpg</to>
    </transition>
    <!-- it is now 19h -->
    <transition type="overlay">
    <duration>7200.0</duration>
    <from>/home/b/Pictures/Wallpapers/AllDayLong/07.jpg</from>
    <to>/home/b/Pictures/Wallpapers/AllDayLong/08.jpg</to>
    </transition>
    <!-- it is now 21h -->
    <static>
    <duration>10800.0</duration>
    <file>/home/b/Pictures/Wallpapers/AllDayLong/08.jpg</file>
    </static>
    <!-- it is now 0h -->
    </background>
    <wallpaper deleted="false">
        <name>AllDayLong</name>
        <filename>/path/to/AllDayLong/AllDayLong.xml</filename>
        <options>zoom</options>
    </wallpaper>
    I am knowledgeable in HTML, but have had no formal training in XML but grasp it fairly well. Not enough to figure out my problem, obviously.

    Thanks in advance.
    CravenMorhead's Avatar
    CravenMorhead Posts: 4,532, Reputation: 1065
    Adult Sexuality Expert
     
    #2

    Sep 11, 2015, 07:08 AM
    Hi,

    Two school of thoughts. The first is, if it works then let it go. Second is to get it working right. You have the first done.

    It looks like it is starting at noon... so start your calculations such that it starts at 12h instead of 0 hour.

    So the first step is set the wall paper for 11am (04.jpg) . Wait an hour(3600), change to the 1pm wallpaper (13h, 05.jpg), and continue from there.

    You could also figure out why your clock is off. Is your clock set right? Is this starting on UTC or GTM or EST (your time zone if I am not mistaken)? Check for external factors. You could have your clock set to +7 instead of -5 which would give you the almost correct time. Only off my 12 hours.
    notcoolenough's Avatar
    notcoolenough Posts: 95, Reputation: 7
    Junior Member
     
    #3

    Sep 11, 2015, 05:31 PM
    Thanks for the reply. I willt ry what you said. My clock is sync'd to internet time. I believe it is minus 7. I am away from my laptop right now so I can't double-check.Thanks again, and if what you suggested doesn't fix it I will just leave it at what it is now.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Synchronizing remotes for 2 harbor breeze mazon model ceiling fan [ 1 Answers ]

I purchased 2 Harbor Breeze Mazon model ceiling fans. Each fan is in a separate room. Each one has its own remote but I cannot get one remote to operate one specific fan, independent of the other. Right now one remote operates both fans while the other does nothing. How can I get one remote to...

Basic XML Schema and Valid XML generation [ 1 Answers ]

Hi, I have an XML schema file as below. Creating and parsing the XML results works but I don't understand how to validate. I understand the concept of a namespace but not the implementation. Why do I need to refer to "http://www.w3.org/2001/XMLSchema"? I just want to create a validation based on...

Error synchronizing folder with in out look [ 2 Answers ]

15:50:00 Synchronizing Mailbox "mailbox name" 15:50:00 Synchronizing Hierarchy 15:50:00 Synchronizing Favorites 15:50:00 Synchronizing Folder 'Inbox' 15:50:06 8 item(s) added to offline folder 15:50:06 Error synchronizing folder 15:50:06 15:50:06 The client operation failed....


View more questions Search