Download the PHP package appkr/timemachine without Composer

On this page you can find all versions of the php package appkr/timemachine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package timemachine

Latest Stable Version Total Downloads Latest Unstable Version License

Timemachine

Manipulates application(Laravel/Lumen) server's time arbitrarily for a given minutes.

CAVEAT

USE THIS ONLY FOR TEST PURPOSE. DO NOT MAKE THIS AVAILABLE IN PUBLICLY ACCESSIBLE SERVICES.

  • Provided apis are not protected by authz.
  • While setting is alive, it affects all time related functions of the application. e.g. created_at written in the DB tables.

1. Install

Pull the library to your project.

Append service provider in the providers array.

Optionally publish config.

2. How to use

There are three APIs. For conveniences, a Postman collection is provided.

2.1. GET /timemachine

Returns time diff from current server time when target_server_time parameter is given. Or print current server time when nothing is given.

field type required description
target_server_time date(Y-m-d H:i:s) optional e.g. 2017-06-01 12:05:00

2.2. PUT /timemachine

Manipulates server's time for the given ttl.

field type required description
add_days int optional(max:365) Number of days to add to current time
sub_days int optional(max:365) Number of days to subtract from current time
add_minutes int optional(max:1440) Number of minutes to add to current time
sub_minutes int optional(max:1440) Number of minutes to subtract from current time
ttl int optional(default:5, max:60) Number of minutes for settings to live

2.3. DELETE /timemachine

Removes time setting and restore back to the machine time.

3. Sponsors

This library is a by-product of a company project. Thanks MeshKorea.

Open source version was created using IntelliJ IDE sponsored by JetBrains.

4. Note on HTTP Date response header

In Nginx, Date header can be settable from application side. So the following was possible:

While in Apache, it is not doable. https://laracasts.com/discuss/channels/servers/how-can-i-override-http-date-response-header-under-apache24


All versions of timemachine with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
illuminate/support Version ^5.0,<5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package appkr/timemachine contains the following files

Loading the files please wait ....