Hi,<br><br>As I understand it, local-time attempts to locate the zoneinfo/ directory in two places: relative to the ASDF package path, or at *load-pathname*.  However, this seems like a fragile, even buggy, strategy for some use cases:<br>
<br>  * When LOAD-ing local-time (not via ASDF) while ASDF is incidentally loaded into the image, local-time will try to locate the ASDF package path anyway, ignoring *load-pathname*.  The result may be NIL, yielding an error in constructing the pathname.<br>
<br>  * When LOAD-ing local-time (not via ASDF) while there is no ASDF in the image, *project-home-directory* will default to the directory of *load-pathname*, which in the current source tree layout is src/ -- whereas the repository is under src/../ -- eventually causing an error in TRUENAME.<br>
<br>  * In a saved image that includes local-time (via ASDF) and ASDF itself, the value of *project-home-directory* may be set at the time of saving.[1]  If the image is deployed in a different environment, it may not find the repository, eventually causing an error in TRUENAME.<br>
<br>  * In a saved image that includes local-time but excludes ASDF, the package path cannot be found, and *load-pathname* may be NIL.[2]  This yields an error in constructing the pathname, before the client has a chance to do anything about it.<br>
<br><br>Is there a better way to use local-time in these cases, or is it worth modifying the way local-time locates the zoneinfo repository?  For now, I have resorted to making the following changes to local-time:<br><br>
  * Allow *project-home-directory* to be NIL, if the ASDF and LOAD-time paths cannot be used.  It is assumed that the library client will take responsibility for updating  the null parameter (and for distributing zoneinfo/ as an external asset).<br>
<br>  * Define a parameter in the local-time.system package that is bound when ASDF performs a load-op on local-time source files, and use its value in local-time if available.<br><br>  * When *load-pathname* is to be used, select its parent directory.<br>
<br>The attached patch contains these changes (against a recent darcs rev.) as a proof of concept.  It is only a working implementation, allowing saved images to use local-time, and loading it without ASDF.  AFAIK, it does not introduce breaking changes.  I would like to get general feedback/advice on the direction before going further.<br>
<br>[1] for example in an executable generated by sb-ext:save-lisp-and-die in SBCL.<br>[2] for example in a monolithic executable generated by asdf:make-build in ECL.<br><br>Thanks<br><br clear="all"><br>-- <br>Abhishek Reddy<br>
<a href="http://abhishek.geek.nz">http://abhishek.geek.nz</a><br><br>