Dynamically changing(loading) images on daily schedule

As a novice ofx user, loading dynamic media is easy enough, but I have a project where I will need to change- reload different images based on the time of day. Is there an existing addon that might help accomplish this?

Assuming that you’ll get the images from web, that might help. examples/imageLoaderWebExample could be what you are looking for. You can get the time of the day like this:

std::string getCurrentTime(const std::string &splitter/)
{
    time_t now = time(0);
    std::tm tstruct;

    memset(&tstruct, 0, sizeof(tstruct));

        char buf[80];
        tstruct = *localtime(&now);
        std::string format = "%H" + splitter + "%M";
        strftime(buf, sizeof(buf), format.c_str(), &tstruct);

        return buf;
}

Or like this:

std::string getCurrentTime()
{
    auto now = std::chrono::system_clock::now();
    auto inTime = std::chrono::system_clock::to_time_t(now);

    std::stringstream ss;
        ss << std::put_time(std::localtime(&inTime), "%Y-%m-%d %X");
        return ss.str();
}

And based on that time you would update your ofImage.
Is that what you asked for?

(copied from my response to your SO post)

You can use https://github.com/bakercp/ofxTime to do some basic time calculations or if you have a icalendar-based schedule you can use https://github.com/bakercp/ofxICalendar which will give you ofEvents for each calendar event. Easier though may be to just use the built-in C++11 time functions (available in openFrameworks 0.9+) http://en.cppreference.com/w/cpp/chrono, http://en.cppreference.com/w/cpp/chrono/duration, etc. Then it’s up to you to create some control logic (if statements, etc) to determine what is currently loaded and what should be loaded based on the current time.

If you want to just use built-in oF functions you can get local time responses for:

int ofGetSeconds();
int ofGetMinutes();
int ofGetHours();
int ofGetYear();
int ofGetMonth();
int ofGetDay();
int ofGetWeekday();