Question: I have x86 C++ application which using ImageMagic++ library. I also have machine with CentOS 7 x86\_64. I need to build my application on this machine.
I have installed i686 ImageMagick library:

```
[dvoryankin@testsuitel]$ yum list installed | grep Magick
 ImageMagick.i686                   6.7.8.9-10.el7                      @base    
 ImageMagick-c++.i686               6.7.8.9-10.el7                      @base    
 ImageMagick-c++-devel.i686         6.7.8.9-10.el7                      @base    
 ImageMagick-devel.i686             6.7.8.9-10.el7                      @base

```

When I try to build my application I have an error:

```
/usr/include/ImageMagick/magick/magick-config.h:9:31:
fatal error: magick-config-64.h: No such file or directory
    #include "magick-config-64.h"

```

It's happened becuase file */usr/include/ImageMagick/magick/magick-config.h* use macro definition `__WORDSIZE` to determine which file must be included *magick-config-64.h* or *magick-config-32.h*. On my machine with CentOS 7 x86\_64 this macro is equal 64 and ImageMagick try to include *magick-config-64.h* but i686 library doesn't have this, only *magick-config-32.h*.

How I can build x86 application with x86 ImageMagick library on CentOS 7 x86\_64 machine without change any library files?

Answer: 
I added this :

```
// Add timeZone
Date.prototype.addTimeZone = function () {
    if(this.getTimezoneOffset() > 0){
        this.setMinutes(this.getTimezoneOffset());
    }

    return this;
};

```

And this on my controller/model :

```
    new Date(myDate).addTimeZone();

```

**To resume :**

**extend-date-prototype.js**

```
// Add timeZone
Date.prototype.addTimeZone = function () {
    if(this.getTimezoneOffset() > 0){
        this.setMinutes(this.getTimezoneOffset());
    }

    return this;
};

// Remove TimeZone
Date.prototype.toJSON = function(){
    return moment(this).format('YYYY-MM-DD') + 'T00:00:00.000Z';
};

```

**view.html**

```
<p ng-bind="(myDate | date:'dd/MM/yyyy')"></p>

```

**controller.js**

```
new Date(myDate).addTimeZone();

```

I use [moment.js](http://momentjs.com/)
You can use [`getTimezoneOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset) to get the offset of the client, then simple math

```
var dateToTranslate = new Date("2015-10-16T00:00:00.000Z");
var timezoneOffset = dateToTranslate.getTimezoneOffset() * 60000;
var newDate = new Date(+dateToTranslate+timezoneOffset);
// Fri Oct 16 2015 00:00:00 GMT+0200 (CEST) in my browser

```