Drupal Association members fund grants that make connections all over the world.
We were having issues with empty (un)publish dates returning "The 'publish on' value does not match the expected format of %time" errors when saving nodes programmatically.
The problem was that the values would come through as arrays, instead of strings, which would then get passed to the trim() function. This returned the string "array", instead of NULL, which would throw off _scheduler_strtotime(). It would return FALSE and throw the error, preventing a node save.
Just adding a check in _scheduler_strtotime() that the passed $str value was indeed a string fixed it. (patch attached)